From f0d4da591d2abe5308fe0bd769d060cdd49aeb28 Mon Sep 17 00:00:00 2001 From: shortcuts Date: Fri, 25 Apr 2025 13:03:09 +0200 Subject: [PATCH 1/3] feat(scripts): add push to mcp-node on release --- scripts/ci/codegen/pushToRepository.ts | 54 +++++++++++++++++++------- scripts/ci/codegen/types.ts | 35 ++++++++++++++++- scripts/cli/index.ts | 16 ++++++-- scripts/specs/index.ts | 16 ++++---- specs/abtesting/spec.yml | 1 + specs/analytics/spec.yml | 1 + specs/ingestion/spec.yml | 1 + specs/insights/spec.yml | 1 + specs/personalization/spec.yml | 1 + specs/query-suggestions/spec.yml | 1 + 10 files changed, 101 insertions(+), 26 deletions(-) diff --git a/scripts/ci/codegen/pushToRepository.ts b/scripts/ci/codegen/pushToRepository.ts index cb213bf7628..8452f3ed163 100644 --- a/scripts/ci/codegen/pushToRepository.ts +++ b/scripts/ci/codegen/pushToRepository.ts @@ -2,8 +2,8 @@ import fsp from 'fs/promises'; import path, { resolve } from 'path'; import { + CLIENTS, configureGitHubAuthor, - ensureGitHubToken, exists, getOctokit, gitBranchExists, @@ -22,16 +22,45 @@ import { getClientsConfigField } from '../../config.ts'; import { commitStartRelease } from './text.ts'; async function handleSpecFiles(spec: SpecsToPush, tempGitDir: string): Promise { - const pathToSpecs = toAbsolutePath(`${tempGitDir}/${spec.output}`); - - await run(`cp ${toAbsolutePath('specs/bundled/README.md')} ${pathToSpecs}`); - await run(`cp ${toAbsolutePath('specs/major-breaking-changes-rename.json')} ${pathToSpecs}`); - await run(`cp ${toAbsolutePath('config/clients.config.json')} ${pathToSpecs}`); - await run(`cp ${toAbsolutePath('docs/bundled/*.json')} ${pathToSpecs}`); - await run(`cp ${toAbsolutePath('docs/bundled/*.yml')} ${pathToSpecs}`); - await run(`cp ${toAbsolutePath('docs/versions-history-with-sla-and-support-policy.json')} ${pathToSpecs}`); + const output = toAbsolutePath(`${tempGitDir}/${spec.output}`); + + if (spec.includeSnippets) { + await run(`cp ${toAbsolutePath('docs/bundled/*-snippets.json')} ${output}`); + } + + if (spec.includeSLA) { + await run(`cp ${toAbsolutePath('specs/bundled/README.md')} ${output}`); + await run(`cp ${toAbsolutePath('specs/major-breaking-changes-rename.json')} ${output}`); + await run(`cp ${toAbsolutePath('config/clients.config.json')} ${output}`); + await run(`cp ${toAbsolutePath('docs/versions-history-with-sla-and-support-policy.json')} ${output}`); + } + // adblock extensions ban words like `analytics` so we use a different file name just so the doc dans render it - await run(`mv ${pathToSpecs}/analytics.yml ${pathToSpecs}/searchstats.yml`); + if (spec.ext === 'yml') { + await run(`mv ${output}/analytics.yml ${output}/searchstats.yml`); + } + + for (const client of CLIENTS) { + const pathToBundledSpec = toAbsolutePath(`docs/bundled/${client}.${spec.ext}`); + + if (!(await exists(pathToBundledSpec))) { + continue; + } + + const outputFile = `${output}/${client}.${spec.ext}`; + + await run(`cp ${pathToBundledSpec} ${outputFile}`); + + if (spec.placeholderVariables) { + let file = await fsp.readFile(outputFile, 'utf8'); + + for (const [k, v] of Object.entries(spec.placeholderVariables)) { + file = file.replace(k, v); + } + + await fsp.writeFile(outputFile, file); + } + } } async function handleGuideFiles(guide: GuidesToPush, tempGitDir: string): Promise { @@ -80,8 +109,6 @@ async function handleGuideFiles(guide: GuidesToPush, tempGitDir: string): Promis } async function pushToRepository(repository: string, config: RepositoryConfiguration): Promise { - const githubToken = ensureGitHubToken(); - const lastCommitMessage = await run('git log -1 --format="%s"'); const author = (await run('git log -1 --format="Co-authored-by: %an <%ae>"')).trim(); const coAuthors = (await run('git log -1 --format="%(trailers:key=Co-authored-by)"')) @@ -100,8 +127,7 @@ async function pushToRepository(repository: string, config: RepositoryConfigurat const tempGitDir = resolve(process.env.RUNNER_TEMP! || toAbsolutePath('foo/local/test'), repository); await fsp.rm(tempGitDir, { force: true, recursive: true }); - const githubURL = `https://${githubToken}:${githubToken}@github.com/${OWNER}/${repository}`; - await run(`git clone --depth 1 ${githubURL} ${tempGitDir}`); + await run(`gh repo clone ${OWNER}/${repository} ${tempGitDir}`); for (const task of config.tasks) { await run(`git checkout ${config.baseBranch}`, { cwd: tempGitDir }); diff --git a/scripts/ci/codegen/types.ts b/scripts/ci/codegen/types.ts index 7d9d1ac869b..d48f2034fd5 100644 --- a/scripts/ci/codegen/types.ts +++ b/scripts/ci/codegen/types.ts @@ -13,8 +13,23 @@ export type GuidesToPush = { }; export type SpecsToPush = { + // the type of changes to push to the repository type: 'specs'; + + // the ext of the specs to be pushed to the repository + ext: 'json' | 'yml'; + + // whether we should include code snippets or not + includeSnippets?: boolean; + + // whether we should include SLA related informations or not + includeSLA?: boolean; + + // the name of the directory to push the files to output: string; + + // a key-value of the fields to replace, with the name you'd like to use instead + placeholderVariables?: Record; }; type RepositoryTask = { @@ -35,7 +50,7 @@ export type RepositoryConfiguration = { tasks: Array; }; -export const pushToRepositoryConfiguration: { [k in 'AlgoliaWeb' | 'doc']: RepositoryConfiguration } = { +export const pushToRepositoryConfiguration: { [k in 'AlgoliaWeb' | 'doc' | 'mcp-node']: RepositoryConfiguration } = { AlgoliaWeb: { baseBranch: 'develop', tasks: [ @@ -72,7 +87,10 @@ export const pushToRepositoryConfiguration: { [k in 'AlgoliaWeb' | 'doc']: Repos commitMessage: 'feat: update specs and supported versions', files: { type: 'specs', + ext: 'yml', output: 'app_data/api/specs', + includeSnippets: true, + includeSLA: true, }, }, { @@ -85,4 +103,19 @@ export const pushToRepositoryConfiguration: { [k in 'AlgoliaWeb' | 'doc']: Repos }, ], }, + 'mcp-node': { + baseBranch: 'main', + tasks: [ + { + prBranch: 'feat/automated-update-for-specs', + commitMessage: 'feat: update specs', + files: { + type: 'specs', + ext: 'json', + output: 'src/data', + placeholderVariables: { appId: 'applicationId' }, + }, + }, + ], + }, }; diff --git a/scripts/cli/index.ts b/scripts/cli/index.ts index 9c76ea95910..f777a807440 100644 --- a/scripts/cli/index.ts +++ b/scripts/cli/index.ts @@ -139,7 +139,7 @@ buildCommand .option('-s, --skip-cache', 'skip cache checking to force building specs') .option('-j, --json', 'outputs the spec in JSON instead of yml') .option('-d, --docs', 'generates the doc specs with the code snippets') - .action(async (clientArg: string[], { verbose, skipCache, outputJson, docs }) => { + .action(async (clientArg: string[], { verbose, skipCache, json, docs }) => { const { client, clientList } = transformSelection({ langArg: ALL, clientArg, @@ -149,10 +149,20 @@ buildCommand await buildSpecs({ clients: client[0] === ALL ? clientList : client, - outputFormat: outputJson ? 'json' : 'yml', - docs: Boolean(docs), + outputFormat: json ? 'json' : 'yml', + docs: docs || json, useCache: !skipCache, }); + + // when building for the docs we generate both formats + if (docs && !json) { + await buildSpecs({ + clients: client[0] === ALL ? clientList : client, + outputFormat: 'json', + docs: true, + useCache: !skipCache, + }); + } }); const ctsCommand = program.command('cts').description('Generate and run the CTS tests'); diff --git a/scripts/specs/index.ts b/scripts/specs/index.ts index a82d4c3daf7..f4f38f3a9a2 100644 --- a/scripts/specs/index.ts +++ b/scripts/specs/index.ts @@ -19,15 +19,14 @@ const ALGOLIASEARCH_LITE_OPERATIONS = ['search', 'customPost', 'getRecommendatio async function buildLiteSpec({ spec, bundledPath, + outputFormat, docs, useCache, -}: { +}: BaseBuildSpecsOptions & { spec: string; bundledPath: string; - docs: boolean; - useCache: boolean; }): Promise { - await buildSpec({ spec: 'recommend', outputFormat: 'yml', docs, useCache }); + await buildSpec({ spec: 'recommend', outputFormat: outputFormat, docs, useCache }); const base = yaml.load(await fsp.readFile(toAbsolutePath(bundledPath), 'utf8')) as Spec; const recommend = yaml.load( @@ -51,7 +50,7 @@ async function buildLiteSpec({ await fsp.writeFile(bundledPath, yaml.dump(lite)); // remove unused components for the outputted light spec - await run(`yarn openapi bundle ${bundledPath} -o ${bundledPath} --ext yml --remove-unused-components`); + await run(`yarn redocly bundle ${bundledPath} -o ${bundledPath} --ext ${outputFormat} --remove-unused-components`); await bundleSpecsForClient(bundledPath, spec); } @@ -73,7 +72,7 @@ async function buildSpec({ // In case of lite we use a the `search` spec as a base because only its bundled form exists. const specBase = isLiteSpec ? 'search' : spec; - const logSuffix = docs ? 'doc spec' : 'spec'; + const logSuffix = `${outputFormat} ${docs ? 'doc spec' : 'spec'}`; const basePath = docs ? 'docs/' : 'specs/'; const deps = isLiteSpec ? ['search', 'recommend'] : [spec]; const cache = new Cache({ @@ -102,7 +101,7 @@ async function buildSpec({ // Then bundle the file const bundledPath = toAbsolutePath(`${basePath}/bundled/${spec}.${outputFormat}`); - await run(`yarn openapi bundle specs/${specBase}/spec.yml -o ${bundledPath} --ext ${outputFormat}`); + await run(`yarn redocly bundle specs/${specBase}/spec.yml -o ${bundledPath} --ext ${outputFormat} `); if (!(await exists(bundledPath))) { throw new Error(`Bundled file not found ${bundledPath}.`); @@ -115,13 +114,14 @@ async function buildSpec({ await buildLiteSpec({ spec, bundledPath: toAbsolutePath(bundledPath), + outputFormat, docs, useCache, }); } spinner.text = `validating '${spec}' ${logSuffix}`; - await run(`yarn openapi lint ${bundledPath}`); + await run(`yarn redocly lint ${bundledPath}`); spinner.text = `linting '${spec}' ${logSuffix}`; await run(`yarn specs:fix ${basePath}/bundled/${spec}.${outputFormat}`); diff --git a/specs/abtesting/spec.yml b/specs/abtesting/spec.yml index 9f61c2804e6..e264ce7fc66 100644 --- a/specs/abtesting/spec.yml +++ b/specs/abtesting/spec.yml @@ -65,6 +65,7 @@ servers: - url: https://analytics.{region}.algolia.com variables: region: + description: The region where your Algolia application is hosted. enum: - us - de diff --git a/specs/analytics/spec.yml b/specs/analytics/spec.yml index bc1de2d80df..59a41125116 100644 --- a/specs/analytics/spec.yml +++ b/specs/analytics/spec.yml @@ -78,6 +78,7 @@ servers: - url: https://analytics.{region}.algolia.com variables: region: + description: The region where your Algolia application is hosted. enum: - us - de diff --git a/specs/ingestion/spec.yml b/specs/ingestion/spec.yml index 74bc7de1490..9f42fe8ac9d 100644 --- a/specs/ingestion/spec.yml +++ b/specs/ingestion/spec.yml @@ -52,6 +52,7 @@ servers: - url: https://data.{region}.algolia.com variables: region: + description: The region where your Algolia application is hosted. enum: - eu - us diff --git a/specs/insights/spec.yml b/specs/insights/spec.yml index f9fd5face6c..bae55c400aa 100644 --- a/specs/insights/spec.yml +++ b/specs/insights/spec.yml @@ -66,6 +66,7 @@ servers: - url: https://insights.{region}.algolia.io variables: region: + description: The region where your Algolia application is hosted. enum: - us - de diff --git a/specs/personalization/spec.yml b/specs/personalization/spec.yml index e4fc642e029..13315450e60 100644 --- a/specs/personalization/spec.yml +++ b/specs/personalization/spec.yml @@ -67,6 +67,7 @@ servers: - url: https://personalization.{region}.algolia.com variables: region: + description: The region where your Algolia application is hosted. enum: - us - eu diff --git a/specs/query-suggestions/spec.yml b/specs/query-suggestions/spec.yml index 02a0a27230a..747a617af91 100644 --- a/specs/query-suggestions/spec.yml +++ b/specs/query-suggestions/spec.yml @@ -56,6 +56,7 @@ servers: If you connect to the wrong region, the API returns an error with the status `401` and the message: "The log processing region does not match". variables: region: + description: The region where your Algolia application is hosted. enum: - us - eu From a0ccb16ef2ef07bdc692ab691de6414ee77e92d9 Mon Sep 17 00:00:00 2001 From: shortcuts Date: Fri, 25 Apr 2025 13:23:18 +0200 Subject: [PATCH 2/3] chore: flag mcp tool --- .github/workflows/check.yml | 4 ++-- specs/abtesting/paths/abtests.yml | 1 + specs/analytics/paths/search/getNoResultsRate.yml | 1 + specs/analytics/paths/search/getTopHits.yml | 1 + specs/analytics/paths/search/getTopSearches.yml | 1 + specs/ingestion/paths/destinations/destinations.yml | 1 + specs/ingestion/paths/sources/sources.yml | 1 + specs/ingestion/paths/tasks/v2/tasks.yml | 1 + specs/ingestion/paths/transformations/transformations.yml | 1 + specs/monitoring/paths/getClusterStatus.yml | 1 + specs/monitoring/paths/getIncidents.yml | 1 + specs/search/paths/manage_indices/listIndices.yml | 1 + specs/search/paths/objects/batch.yml | 1 + specs/search/paths/objects/deleteBy.yml | 1 + specs/search/paths/objects/multipleBatch.yml | 1 + specs/search/paths/objects/object.yml | 2 +- specs/search/paths/objects/objects.yml | 1 + specs/search/paths/rules/searchRules.yml | 1 + specs/search/paths/search/searchSingleIndex.yml | 1 + specs/search/paths/settings/settings.yml | 1 + specs/search/paths/synonyms/searchSynonyms.yml | 1 + 21 files changed, 22 insertions(+), 3 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 824c8be125f..b69330272bc 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -161,7 +161,7 @@ jobs: type: minimal - name: Building specs - run: yarn cli build specs + run: yarn cli build specs -s - name: Store bundled specs uses: actions/upload-artifact@v4 @@ -545,7 +545,7 @@ jobs: type: minimal - name: Generate documentation specs with code snippets - run: yarn cli build specs --docs + run: yarn cli build specs --docs -s - name: Read benchmark results id: benchmark diff --git a/specs/abtesting/paths/abtests.yml b/specs/abtesting/paths/abtests.yml index b61a97a81d6..55156317277 100644 --- a/specs/abtesting/paths/abtests.yml +++ b/specs/abtesting/paths/abtests.yml @@ -57,6 +57,7 @@ get: tags: - abtest operationId: listABTests + x-mcp-tool: true x-acl: - analytics summary: List all A/B tests diff --git a/specs/analytics/paths/search/getNoResultsRate.yml b/specs/analytics/paths/search/getNoResultsRate.yml index e1bce775bb2..86d46d1cbb4 100644 --- a/specs/analytics/paths/search/getNoResultsRate.yml +++ b/specs/analytics/paths/search/getNoResultsRate.yml @@ -2,6 +2,7 @@ get: tags: - search operationId: getNoResultsRate + x-mcp-tool: true x-acl: - analytics summary: Retrieve no results rate diff --git a/specs/analytics/paths/search/getTopHits.yml b/specs/analytics/paths/search/getTopHits.yml index eac581cca99..f6c56f4b49c 100644 --- a/specs/analytics/paths/search/getTopHits.yml +++ b/specs/analytics/paths/search/getTopHits.yml @@ -2,6 +2,7 @@ get: tags: - search operationId: getTopHits + x-mcp-tool: true x-acl: - analytics summary: Retrieve top search results diff --git a/specs/analytics/paths/search/getTopSearches.yml b/specs/analytics/paths/search/getTopSearches.yml index a18070c2360..3d2b5b163c7 100644 --- a/specs/analytics/paths/search/getTopSearches.yml +++ b/specs/analytics/paths/search/getTopSearches.yml @@ -2,6 +2,7 @@ get: tags: - search operationId: getTopSearches + x-mcp-tool: true x-acl: - analytics summary: Retrieve top searches diff --git a/specs/ingestion/paths/destinations/destinations.yml b/specs/ingestion/paths/destinations/destinations.yml index a0b9986eb8f..dd2d1bf1204 100644 --- a/specs/ingestion/paths/destinations/destinations.yml +++ b/specs/ingestion/paths/destinations/destinations.yml @@ -4,6 +4,7 @@ get: summary: List destinations description: Retrieves a list of destinations. operationId: listDestinations + x-mcp-tool: true x-acl: - addObject - deleteIndex diff --git a/specs/ingestion/paths/sources/sources.yml b/specs/ingestion/paths/sources/sources.yml index eb9f969703c..6ab19cac2b2 100644 --- a/specs/ingestion/paths/sources/sources.yml +++ b/specs/ingestion/paths/sources/sources.yml @@ -4,6 +4,7 @@ get: summary: List sources description: Retrieves a list of sources. operationId: listSources + x-mcp-tool: true x-acl: - addObject - deleteIndex diff --git a/specs/ingestion/paths/tasks/v2/tasks.yml b/specs/ingestion/paths/tasks/v2/tasks.yml index 1fafeb1a32f..ebd6dc4e930 100644 --- a/specs/ingestion/paths/tasks/v2/tasks.yml +++ b/specs/ingestion/paths/tasks/v2/tasks.yml @@ -4,6 +4,7 @@ get: summary: List tasks description: Retrieves a list of tasks. operationId: listTasks + x-mcp-tool: true x-acl: - addObject - deleteIndex diff --git a/specs/ingestion/paths/transformations/transformations.yml b/specs/ingestion/paths/transformations/transformations.yml index a88dd1fe621..60bf09b6523 100644 --- a/specs/ingestion/paths/transformations/transformations.yml +++ b/specs/ingestion/paths/transformations/transformations.yml @@ -4,6 +4,7 @@ get: summary: List transformations description: Retrieves a list of transformations. operationId: listTransformations + x-mcp-tool: true x-acl: - addObject - deleteIndex diff --git a/specs/monitoring/paths/getClusterStatus.yml b/specs/monitoring/paths/getClusterStatus.yml index c6da09b349a..add586f6bc9 100644 --- a/specs/monitoring/paths/getClusterStatus.yml +++ b/specs/monitoring/paths/getClusterStatus.yml @@ -2,6 +2,7 @@ get: summary: Retrieve cluster status description: Retrieves the status of selected clusters. operationId: getClusterStatus + x-mcp-tool: true tags: - status security: [] diff --git a/specs/monitoring/paths/getIncidents.yml b/specs/monitoring/paths/getIncidents.yml index af43dc3b26b..4919cf50929 100644 --- a/specs/monitoring/paths/getIncidents.yml +++ b/specs/monitoring/paths/getIncidents.yml @@ -2,6 +2,7 @@ get: summary: Retrieve all incidents description: Retrieves known incidents for all clusters. operationId: getIncidents + x-mcp-tool: true security: [] tags: - incidents diff --git a/specs/search/paths/manage_indices/listIndices.yml b/specs/search/paths/manage_indices/listIndices.yml index a83782ff00e..fa388fcdee0 100644 --- a/specs/search/paths/manage_indices/listIndices.yml +++ b/specs/search/paths/manage_indices/listIndices.yml @@ -2,6 +2,7 @@ get: tags: - Indices operationId: listIndices + x-mcp-tool: true x-acl: - listIndexes summary: List indices diff --git a/specs/search/paths/objects/batch.yml b/specs/search/paths/objects/batch.yml index 2b28b26d17c..0149d176a75 100644 --- a/specs/search/paths/objects/batch.yml +++ b/specs/search/paths/objects/batch.yml @@ -2,6 +2,7 @@ post: tags: - Records operationId: batch + x-mcp-tool: true summary: Batch indexing operations on one index description: | Adds, updates, or deletes records in one index with a single API request. diff --git a/specs/search/paths/objects/deleteBy.yml b/specs/search/paths/objects/deleteBy.yml index 7ec46a93acf..fd03035e5d2 100644 --- a/specs/search/paths/objects/deleteBy.yml +++ b/specs/search/paths/objects/deleteBy.yml @@ -2,6 +2,7 @@ post: tags: - Records operationId: deleteBy + x-mcp-tool: true x-acl: - deleteIndex summary: Delete records matching a filter diff --git a/specs/search/paths/objects/multipleBatch.yml b/specs/search/paths/objects/multipleBatch.yml index f0667f4c161..40481ae6c83 100644 --- a/specs/search/paths/objects/multipleBatch.yml +++ b/specs/search/paths/objects/multipleBatch.yml @@ -2,6 +2,7 @@ post: tags: - Records operationId: multipleBatch + x-mcp-tool: true description: | Adds, updates, or deletes records in multiple indices with a single API request. diff --git a/specs/search/paths/objects/object.yml b/specs/search/paths/objects/object.yml index a615e26f3be..193a622bc4e 100644 --- a/specs/search/paths/objects/object.yml +++ b/specs/search/paths/objects/object.yml @@ -91,7 +91,7 @@ delete: Deletes a record by its object ID. To delete more than one record, use the [`batch` operation](#tag/Records/operation/batch). - To delete records matching a query, use the [`deleteByQuery` operation](#tag/Records/operation/deleteBy). + To delete records matching a query, use the [`deleteBy` operation](#tag/Records/operation/deleteBy). parameters: - $ref: '../../../common/parameters.yml#/IndexName' diff --git a/specs/search/paths/objects/objects.yml b/specs/search/paths/objects/objects.yml index 6d9e1ceba38..23dd01a01e5 100644 --- a/specs/search/paths/objects/objects.yml +++ b/specs/search/paths/objects/objects.yml @@ -2,6 +2,7 @@ post: tags: - Records operationId: saveObject + x-mcp-tool: true x-acl: - addObject description: | diff --git a/specs/search/paths/rules/searchRules.yml b/specs/search/paths/rules/searchRules.yml index 74e34f81563..af0ded64c79 100644 --- a/specs/search/paths/rules/searchRules.yml +++ b/specs/search/paths/rules/searchRules.yml @@ -2,6 +2,7 @@ post: tags: - Rules operationId: searchRules + x-mcp-tool: true x-use-read-transporter: true x-cacheable: true x-acl: diff --git a/specs/search/paths/search/searchSingleIndex.yml b/specs/search/paths/search/searchSingleIndex.yml index 70e182e0647..0893f140ed6 100644 --- a/specs/search/paths/search/searchSingleIndex.yml +++ b/specs/search/paths/search/searchSingleIndex.yml @@ -2,6 +2,7 @@ post: tags: - Search operationId: searchSingleIndex + x-mcp-tool: true x-use-read-transporter: true x-cacheable: true x-acl: diff --git a/specs/search/paths/settings/settings.yml b/specs/search/paths/settings/settings.yml index e2fe69f7426..ac740ff6bdc 100644 --- a/specs/search/paths/settings/settings.yml +++ b/specs/search/paths/settings/settings.yml @@ -2,6 +2,7 @@ get: tags: - Indices operationId: getSettings + x-mcp-tool: true x-acl: - search description: Retrieves an object with non-null index settings. diff --git a/specs/search/paths/synonyms/searchSynonyms.yml b/specs/search/paths/synonyms/searchSynonyms.yml index 0c193eda1ec..6d82765a992 100644 --- a/specs/search/paths/synonyms/searchSynonyms.yml +++ b/specs/search/paths/synonyms/searchSynonyms.yml @@ -2,6 +2,7 @@ post: tags: - Synonyms operationId: searchSynonyms + x-mcp-tool: true x-use-read-transporter: true x-cacheable: true x-acl: From ffb0e40e60ad80cdc94a32e8b6d4e08d7d581898 Mon Sep 17 00:00:00 2001 From: shortcuts Date: Fri, 25 Apr 2025 13:30:50 +0200 Subject: [PATCH 3/3] chore: flag mcp tool --- specs/query-suggestions/paths/getConfigurationStatus.yml | 1 + specs/query-suggestions/paths/getLogFile.yml | 1 + specs/query-suggestions/paths/qsConfig.yml | 2 ++ specs/query-suggestions/paths/qsConfigs.yml | 2 ++ specs/search/paths/objects/partialUpdate.yml | 1 + 5 files changed, 7 insertions(+) diff --git a/specs/query-suggestions/paths/getConfigurationStatus.yml b/specs/query-suggestions/paths/getConfigurationStatus.yml index effa05644ce..f8fb1dd0b9d 100644 --- a/specs/query-suggestions/paths/getConfigurationStatus.yml +++ b/specs/query-suggestions/paths/getConfigurationStatus.yml @@ -2,6 +2,7 @@ get: tags: - configurations operationId: getConfigStatus + x-mcp-tool: true x-acl: - settings summary: Retrieve configuration status diff --git a/specs/query-suggestions/paths/getLogFile.yml b/specs/query-suggestions/paths/getLogFile.yml index 7a10a7d9e9c..12e760a4ea2 100644 --- a/specs/query-suggestions/paths/getLogFile.yml +++ b/specs/query-suggestions/paths/getLogFile.yml @@ -2,6 +2,7 @@ get: tags: - logs operationId: getLogFile + x-mcp-tool: true x-acl: - settings summary: Retrieve logs diff --git a/specs/query-suggestions/paths/qsConfig.yml b/specs/query-suggestions/paths/qsConfig.yml index 1ba08da13df..b8651bb0683 100644 --- a/specs/query-suggestions/paths/qsConfig.yml +++ b/specs/query-suggestions/paths/qsConfig.yml @@ -2,6 +2,7 @@ get: tags: - configurations operationId: getConfig + x-mcp-tool: true x-acl: - settings summary: Retrieve a configuration @@ -26,6 +27,7 @@ put: tags: - configurations operationId: updateConfig + x-mcp-tool: true x-acl: - editSettings summary: Update a configuration diff --git a/specs/query-suggestions/paths/qsConfigs.yml b/specs/query-suggestions/paths/qsConfigs.yml index cee0ecb0898..2572ea0a93c 100644 --- a/specs/query-suggestions/paths/qsConfigs.yml +++ b/specs/query-suggestions/paths/qsConfigs.yml @@ -2,6 +2,7 @@ get: tags: - configurations operationId: getAllConfigs + x-mcp-tool: true x-acl: - settings summary: List configurations @@ -22,6 +23,7 @@ post: tags: - configurations operationId: createConfig + x-mcp-tool: true x-acl: - editSettings summary: Create a configuration diff --git a/specs/search/paths/objects/partialUpdate.yml b/specs/search/paths/objects/partialUpdate.yml index 029192297d3..1b2919114d8 100644 --- a/specs/search/paths/objects/partialUpdate.yml +++ b/specs/search/paths/objects/partialUpdate.yml @@ -2,6 +2,7 @@ post: tags: - Records operationId: partialUpdateObject + x-mcp-tool: true x-acl: - addObject summary: Add or update attributes