From be36e1520c295adc4396ff8f85b46203e3a3b8f4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 2 Aug 2025 02:42:39 +0000 Subject: [PATCH 01/89] feat(mcp): add logging when environment variable is set --- packages/mcp-server/src/server.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/mcp-server/src/server.ts b/packages/mcp-server/src/server.ts index 2e35ef9f..e982cc01 100644 --- a/packages/mcp-server/src/server.ts +++ b/packages/mcp-server/src/server.ts @@ -28,7 +28,7 @@ export const server = new McpServer( name: 'julep_sdk_api', version: '2.7.4', }, - { capabilities: { tools: {} } }, + { capabilities: { tools: {}, logging: {} } }, ); /** From e98a0891b4800926d6d8ac8b796f93fd193f27ec Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 5 Aug 2025 03:20:37 +0000 Subject: [PATCH 02/89] feat(mcp): remote server with passthru auth --- packages/mcp-server/package.json | 2 + packages/mcp-server/src/headers.ts | 24 +++++++++ packages/mcp-server/src/http.ts | 85 ++++++++++++++++++++++++++++++ packages/mcp-server/src/index.ts | 26 +++++---- packages/mcp-server/src/options.ts | 16 ++++++ packages/mcp-server/src/server.ts | 19 ++++--- packages/mcp-server/src/stdio.ts | 14 +++++ 7 files changed, 167 insertions(+), 19 deletions(-) create mode 100644 packages/mcp-server/src/headers.ts create mode 100644 packages/mcp-server/src/http.ts create mode 100644 packages/mcp-server/src/stdio.ts diff --git a/packages/mcp-server/package.json b/packages/mcp-server/package.json index 76b9073a..16520c01 100644 --- a/packages/mcp-server/package.json +++ b/packages/mcp-server/package.json @@ -29,6 +29,7 @@ "dependencies": { "@julep/sdk": "file:../../dist/", "@modelcontextprotocol/sdk": "^1.11.5", + "express": "^5.1.0", "jq-web": "https://github.com/stainless-api/jq-web/releases/download/v0.8.2/jq-web.tar.gz", "yargs": "^17.7.2", "@cloudflare/cabidela": "^0.2.4", @@ -40,6 +41,7 @@ }, "devDependencies": { "@types/jest": "^29.4.0", + "@types/express": "^5.0.3", "@typescript-eslint/eslint-plugin": "8.31.1", "@typescript-eslint/parser": "8.31.1", "eslint": "^8.49.0", diff --git a/packages/mcp-server/src/headers.ts b/packages/mcp-server/src/headers.ts new file mode 100644 index 00000000..60a4e576 --- /dev/null +++ b/packages/mcp-server/src/headers.ts @@ -0,0 +1,24 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import { type ClientOptions } from '@julep/sdk/index'; + +import { IncomingMessage } from 'node:http'; + +export const parseAuthHeaders = (req: IncomingMessage): Partial => { + if (req.headers.authorization) { + const scheme = req.headers.authorization.slice(req.headers.authorization.search(' ')); + const value = req.headers.authorization.slice(scheme.length + 1); + switch (scheme) { + case 'Bearer': + return { apiKey: req.headers.authorization.slice('Bearer '.length) }; + default: + throw new Error(`Unsupported authorization scheme`); + } + } + + const apiKey = + req.headers['x-julep-api-key'] instanceof Array ? + req.headers['x-julep-api-key'][0] + : req.headers['x-julep-api-key']; + return { apiKey }; +}; diff --git a/packages/mcp-server/src/http.ts b/packages/mcp-server/src/http.ts new file mode 100644 index 00000000..be3864c1 --- /dev/null +++ b/packages/mcp-server/src/http.ts @@ -0,0 +1,85 @@ +import { McpServer } from '@modelcontextprotocol/sdk/server/mcp'; +import { StreamableHTTPServerTransport } from '@modelcontextprotocol/sdk/server/streamableHttp.js'; + +import express from 'express'; +import { McpOptions } from './options'; +import { initMcpServer, newMcpServer } from './server'; +import { parseAuthHeaders } from './headers'; +import { Endpoint } from './tools'; + +const newServer = (mcpOptions: McpOptions, req: express.Request, res: express.Response): McpServer | null => { + const server = newMcpServer(); + try { + const authOptions = parseAuthHeaders(req); + initMcpServer({ + server: server, + clientOptions: { + ...authOptions, + defaultHeaders: { + 'X-Stainless-MCP': 'true', + }, + }, + mcpOptions, + }); + } catch { + res.status(401).json({ + jsonrpc: '2.0', + error: { + code: -32000, + message: 'Unauthorized', + }, + }); + return null; + } + + return server; +}; + +const post = (defaultOptions: McpOptions) => async (req: express.Request, res: express.Response) => { + const server = newServer(defaultOptions, req, res); + // If we return null, we already set the authorization error. + if (server === null) return; + const transport = new StreamableHTTPServerTransport({ + // Stateless server + sessionIdGenerator: undefined, + }); + await server.connect(transport); + await transport.handleRequest(req, res, req.body); +}; + +const get = async (req: express.Request, res: express.Response) => { + res.status(405).json({ + jsonrpc: '2.0', + error: { + code: -32000, + message: 'Method not supported', + }, + }); +}; + +const del = async (req: express.Request, res: express.Response) => { + res.status(405).json({ + jsonrpc: '2.0', + error: { + code: -32000, + message: 'Method not supported', + }, + }); +}; + +export const launchStreamableHTTPServer = async ( + options: McpOptions, + endpoints: Endpoint[], + port: number | undefined, +) => { + const app = express(); + app.use(express.json()); + + app.get('/', get); + app.post('/', post(options)); + app.delete('/', del); + + console.error(`MCP Server running on streamable HTTP on port ${port}`); + + app.listen(port); +}; diff --git a/packages/mcp-server/src/index.ts b/packages/mcp-server/src/index.ts index 06213572..7a4f1380 100644 --- a/packages/mcp-server/src/index.ts +++ b/packages/mcp-server/src/index.ts @@ -1,9 +1,10 @@ #!/usr/bin/env node -import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'; -import { init, selectTools, server } from './server'; +import { selectTools } from './server'; import { Endpoint, endpoints } from './tools'; import { McpOptions, parseOptions } from './options'; +import { launchStdioServer } from './stdio'; +import { launchStreamableHTTPServer } from './http'; async function main() { const options = parseOptionsOrError(); @@ -13,18 +14,21 @@ async function main() { return; } - const includedTools = selectToolsOrError(endpoints, options); + const selectedTools = selectToolsOrError(endpoints, options); console.error( - `MCP Server starting with ${includedTools.length} tools:`, - includedTools.map((e) => e.tool.name), + `MCP Server starting with ${selectedTools.length} tools:`, + selectedTools.map((e) => e.tool.name), ); - init({ server, endpoints: includedTools }); - - const transport = new StdioServerTransport(); - await server.connect(transport); - console.error('MCP Server running on stdio'); + switch (options.transport) { + case 'stdio': + await launchStdioServer(options, selectedTools); + break; + case 'http': + await launchStreamableHTTPServer(options, selectedTools, options.port); + break; + } } if (require.main === module) { @@ -43,7 +47,7 @@ function parseOptionsOrError() { } } -function selectToolsOrError(endpoints: Endpoint[], options: McpOptions) { +function selectToolsOrError(endpoints: Endpoint[], options: McpOptions): Endpoint[] { try { const includedTools = selectTools(endpoints, options); if (includedTools.length === 0) { diff --git a/packages/mcp-server/src/options.ts b/packages/mcp-server/src/options.ts index c0751018..daf58380 100644 --- a/packages/mcp-server/src/options.ts +++ b/packages/mcp-server/src/options.ts @@ -5,6 +5,8 @@ import { ClientCapabilities, knownClients, ClientType } from './compat'; export type CLIOptions = McpOptions & { list: boolean; + transport: 'stdio' | 'http'; + port: number | undefined; }; export type McpOptions = { @@ -129,6 +131,16 @@ export function parseOptions(): CLIOptions { type: 'boolean', description: 'Print detailed explanation of client capabilities and exit', }) + .option('transport', { + type: 'string', + choices: ['stdio', 'http'], + default: 'stdio', + description: 'What transport to use; stdio for local servers or http for remote servers', + }) + .option('port', { + type: 'number', + description: 'Port to serve on if using http transport', + }) .help(); for (const [command, desc] of examples()) { @@ -238,6 +250,8 @@ export function parseOptions(): CLIOptions { const includeAllTools = explicitTools ? argv.tools?.includes('all') && !argv.noTools?.includes('all') : undefined; + const transport = argv.transport as 'stdio' | 'http'; + const client = argv.client as ClientType; return { client: client && knownClients[client] ? client : undefined, @@ -246,6 +260,8 @@ export function parseOptions(): CLIOptions { filters, capabilities: clientCapabilities, list: argv.list || false, + transport, + port: argv.port, }; } diff --git a/packages/mcp-server/src/server.ts b/packages/mcp-server/src/server.ts index e982cc01..f793920f 100644 --- a/packages/mcp-server/src/server.ts +++ b/packages/mcp-server/src/server.ts @@ -22,14 +22,17 @@ export { Filter } from './tools'; export { ClientOptions } from '@julep/sdk'; export { endpoints } from './tools'; +export const newMcpServer = () => + new McpServer( + { + name: 'julep_sdk_api', + version: '2.7.4', + }, + { capabilities: { tools: {}, logging: {} } }, + ); + // Create server instance -export const server = new McpServer( - { - name: 'julep_sdk_api', - version: '2.7.4', - }, - { capabilities: { tools: {}, logging: {} } }, -); +export const server = newMcpServer(); /** * Initializes the provided MCP Server with the given tools and handlers. @@ -88,7 +91,7 @@ export function init(params: { /** * Selects the tools to include in the MCP Server based on the provided options. */ -export function selectTools(endpoints: Endpoint[], options: McpOptions) { +export function selectTools(endpoints: Endpoint[], options: McpOptions): Endpoint[] { const filteredEndpoints = query(options.filters, endpoints); let includedTools = filteredEndpoints; diff --git a/packages/mcp-server/src/stdio.ts b/packages/mcp-server/src/stdio.ts new file mode 100644 index 00000000..b2691635 --- /dev/null +++ b/packages/mcp-server/src/stdio.ts @@ -0,0 +1,14 @@ +import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'; +import { init, newMcpServer } from './server'; +import { Endpoint } from './tools'; +import { McpOptions } from './options'; + +export const launchStdioServer = async (options: McpOptions, endpoints: Endpoint[]) => { + const server = newMcpServer(); + + init({ server, endpoints }); + + const transport = new StdioServerTransport(); + await server.connect(transport); + console.error('MCP Server running on stdio'); +}; From c0d102255f5453422dc5b562a0a0c0c7049e0c69 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 6 Aug 2025 03:33:27 +0000 Subject: [PATCH 03/89] fix(mcp): fix bug in header handling --- packages/mcp-server/src/headers.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/mcp-server/src/headers.ts b/packages/mcp-server/src/headers.ts index 60a4e576..0fe02064 100644 --- a/packages/mcp-server/src/headers.ts +++ b/packages/mcp-server/src/headers.ts @@ -6,7 +6,7 @@ import { IncomingMessage } from 'node:http'; export const parseAuthHeaders = (req: IncomingMessage): Partial => { if (req.headers.authorization) { - const scheme = req.headers.authorization.slice(req.headers.authorization.search(' ')); + const scheme = req.headers.authorization.split(' ')[0]!; const value = req.headers.authorization.slice(scheme.length + 1); switch (scheme) { case 'Bearer': From e9e87771a244b79cf4acfb3eac691a6ece19dd45 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 7 Aug 2025 02:25:49 +0000 Subject: [PATCH 04/89] chore(internal): move publish config --- bin/publish-npm | 2 +- package.json | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/publish-npm b/bin/publish-npm index fa2243d2..45e8aa80 100644 --- a/bin/publish-npm +++ b/bin/publish-npm @@ -58,4 +58,4 @@ else fi # Publish with the appropriate tag -yarn publish --access public --tag "$TAG" +yarn publish --tag "$TAG" diff --git a/package.json b/package.json index d5035477..4564583b 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,9 @@ "**/*" ], "private": false, + "publishConfig": { + "access": "public" + }, "scripts": { "test": "./scripts/test", "build": "./scripts/build", From 00cb972cf1a90c69d879c10d0417e0429f76b88d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 7 Aug 2025 02:29:12 +0000 Subject: [PATCH 05/89] chore(mcp): refactor streamable http transport --- packages/mcp-server/src/http.ts | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/packages/mcp-server/src/http.ts b/packages/mcp-server/src/http.ts index be3864c1..d64f723d 100644 --- a/packages/mcp-server/src/http.ts +++ b/packages/mcp-server/src/http.ts @@ -1,3 +1,5 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + import { McpServer } from '@modelcontextprotocol/sdk/server/mcp'; import { StreamableHTTPServerTransport } from '@modelcontextprotocol/sdk/server/streamableHttp.js'; @@ -67,11 +69,7 @@ const del = async (req: express.Request, res: express.Response) => { }); }; -export const launchStreamableHTTPServer = async ( - options: McpOptions, - endpoints: Endpoint[], - port: number | undefined, -) => { +export const streamableHTTPApp = (options: McpOptions) => { const app = express(); app.use(express.json()); @@ -79,7 +77,23 @@ export const launchStreamableHTTPServer = async ( app.post('/', post(options)); app.delete('/', del); - console.error(`MCP Server running on streamable HTTP on port ${port}`); + return app; +}; + +export const launchStreamableHTTPServer = async ( + options: McpOptions, + endpoints: Endpoint[], + port: number | undefined, +) => { + const app = streamableHTTPApp(options); + const server = app.listen(port); + const address = server.address(); - app.listen(port); + if (typeof address === 'string') { + console.error(`MCP Server running on streamable HTTP at ${address}`); + } else if (address !== null) { + console.error(`MCP Server running on streamable HTTP on port ${address.port}`); + } else { + console.error(`MCP Server running on streamable HTTP on port ${port}`); + } }; From e2fdc8be5b7f55135fe889bb68ff076ff2e83c9f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 7 Aug 2025 02:30:16 +0000 Subject: [PATCH 06/89] feat(mcp): add unix socket option for remote MCP --- packages/mcp-server/src/http.ts | 2 +- packages/mcp-server/src/index.ts | 2 +- packages/mcp-server/src/options.ts | 6 ++++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/mcp-server/src/http.ts b/packages/mcp-server/src/http.ts index d64f723d..900e1319 100644 --- a/packages/mcp-server/src/http.ts +++ b/packages/mcp-server/src/http.ts @@ -83,7 +83,7 @@ export const streamableHTTPApp = (options: McpOptions) => { export const launchStreamableHTTPServer = async ( options: McpOptions, endpoints: Endpoint[], - port: number | undefined, + port: number | string | undefined, ) => { const app = streamableHTTPApp(options); const server = app.listen(port); diff --git a/packages/mcp-server/src/index.ts b/packages/mcp-server/src/index.ts index 7a4f1380..4c71a3bc 100644 --- a/packages/mcp-server/src/index.ts +++ b/packages/mcp-server/src/index.ts @@ -26,7 +26,7 @@ async function main() { await launchStdioServer(options, selectedTools); break; case 'http': - await launchStreamableHTTPServer(options, selectedTools, options.port); + await launchStreamableHTTPServer(options, selectedTools, options.port ?? options.socket); break; } } diff --git a/packages/mcp-server/src/options.ts b/packages/mcp-server/src/options.ts index daf58380..c290ca50 100644 --- a/packages/mcp-server/src/options.ts +++ b/packages/mcp-server/src/options.ts @@ -7,6 +7,7 @@ export type CLIOptions = McpOptions & { list: boolean; transport: 'stdio' | 'http'; port: number | undefined; + socket: string | undefined; }; export type McpOptions = { @@ -141,6 +142,10 @@ export function parseOptions(): CLIOptions { type: 'number', description: 'Port to serve on if using http transport', }) + .option('socket', { + type: 'string', + description: 'Unix socket to serve on if using http transport', + }) .help(); for (const [command, desc] of examples()) { @@ -262,6 +267,7 @@ export function parseOptions(): CLIOptions { list: argv.list || false, transport, port: argv.port, + socket: argv.socket, }; } From 3237c3b7e985e59c6459fbda21f3e79353187df1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 9 Aug 2025 02:47:47 +0000 Subject: [PATCH 07/89] chore: update @stainless-api/prism-cli to v5.15.0 --- scripts/mock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/mock b/scripts/mock index d2814ae6..0b28f6ea 100755 --- a/scripts/mock +++ b/scripts/mock @@ -21,7 +21,7 @@ echo "==> Starting mock server with URL ${URL}" # Run prism mock on the given spec if [ "$1" == "--daemon" ]; then - npm exec --package=@stainless-api/prism-cli@5.8.5 -- prism mock "$URL" &> .prism.log & + npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL" &> .prism.log & # Wait for server to come online echo -n "Waiting for server" @@ -37,5 +37,5 @@ if [ "$1" == "--daemon" ]; then echo else - npm exec --package=@stainless-api/prism-cli@5.8.5 -- prism mock "$URL" + npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL" fi From dae9b0fbfa4616d0211eaff2747723e4eca697c8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 9 Aug 2025 02:51:13 +0000 Subject: [PATCH 08/89] chore(internal): update comment in script --- scripts/test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/test b/scripts/test index 2049e31b..7bce0516 100755 --- a/scripts/test +++ b/scripts/test @@ -43,7 +43,7 @@ elif ! prism_is_running ; then echo -e "To run the server, pass in the path or url of your OpenAPI" echo -e "spec to the prism command:" echo - echo -e " \$ ${YELLOW}npm exec --package=@stoplight/prism-cli@~5.3.2 -- prism mock path/to/your.openapi.yml${NC}" + echo -e " \$ ${YELLOW}npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock path/to/your.openapi.yml${NC}" echo exit 1 From b09d85c6a6e0bc2eac482ba9cfb9b7b09ec5679d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 12 Aug 2025 02:05:22 +0000 Subject: [PATCH 09/89] chore(internal): codegen related update --- packages/mcp-server/package.json | 2 +- packages/mcp-server/src/filtering.ts | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/mcp-server/package.json b/packages/mcp-server/package.json index 16520c01..67f0f124 100644 --- a/packages/mcp-server/package.json +++ b/packages/mcp-server/package.json @@ -30,7 +30,7 @@ "@julep/sdk": "file:../../dist/", "@modelcontextprotocol/sdk": "^1.11.5", "express": "^5.1.0", - "jq-web": "https://github.com/stainless-api/jq-web/releases/download/v0.8.2/jq-web.tar.gz", + "jq-web": "https://github.com/stainless-api/jq-web/releases/download/v0.8.6/jq-web.tar.gz", "yargs": "^17.7.2", "@cloudflare/cabidela": "^0.2.4", "zod": "^3.25.20", diff --git a/packages/mcp-server/src/filtering.ts b/packages/mcp-server/src/filtering.ts index 87eab2de..1aa9a40c 100644 --- a/packages/mcp-server/src/filtering.ts +++ b/packages/mcp-server/src/filtering.ts @@ -1,8 +1,7 @@ // @ts-nocheck import initJq from 'jq-web'; -export async function maybeFilter(args: Record | undefined, response: any): Promise { - const jqFilter = args?.['jq_filter']; +export async function maybeFilter(jqFilter: unknown | undefined, response: any): Promise { if (jqFilter && typeof jqFilter === 'string') { return await jq(response, jqFilter); } else { From dc011fea568e36e556942012656a4cfcc4ccd101 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 14 Aug 2025 02:38:17 +0000 Subject: [PATCH 10/89] chore(mcp): minor cleanup of types and package.json --- packages/mcp-server/package.json | 1 + packages/mcp-server/src/http.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/mcp-server/package.json b/packages/mcp-server/package.json index 67f0f124..0b8d1181 100644 --- a/packages/mcp-server/package.json +++ b/packages/mcp-server/package.json @@ -42,6 +42,7 @@ "devDependencies": { "@types/jest": "^29.4.0", "@types/express": "^5.0.3", + "@types/yargs": "^17.0.8", "@typescript-eslint/eslint-plugin": "8.31.1", "@typescript-eslint/parser": "8.31.1", "eslint": "^8.49.0", diff --git a/packages/mcp-server/src/http.ts b/packages/mcp-server/src/http.ts index 900e1319..e188c9ed 100644 --- a/packages/mcp-server/src/http.ts +++ b/packages/mcp-server/src/http.ts @@ -69,7 +69,7 @@ const del = async (req: express.Request, res: express.Response) => { }); }; -export const streamableHTTPApp = (options: McpOptions) => { +export const streamableHTTPApp = (options: McpOptions): express.Express => { const app = express(); app.use(express.json()); From 12bd79f67acb13742b83e0bd692f58e8759cef8b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 15 Aug 2025 02:15:32 +0000 Subject: [PATCH 11/89] fix(mcp): generate additionalProperties=true for map schemas to avoid validation issues --- .../src/tools/agents/create-agents.ts | 4 +- .../tools/agents/create-or-update-agents.ts | 4 +- .../agents/docs/bulk-delete-agents-docs.ts | 1 + .../tools/agents/docs/create-agents-docs.ts | 4 +- .../src/tools/agents/docs/list-agents-docs.ts | 3 +- .../tools/agents/docs/search-agents-docs.ts | 8 ++- .../mcp-server/src/tools/agents/get-agents.ts | 2 +- .../src/tools/agents/list-agents.ts | 3 +- .../src/tools/agents/reset-agents.ts | 4 +- .../tools/agents/tools/create-agents-tools.ts | 30 +++++++++++ .../tools/agents/tools/reset-agents-tools.ts | 30 +++++++++++ .../tools/agents/tools/update-agents-tools.ts | 31 +++++++++++ .../src/tools/agents/update-agents.ts | 4 +- .../mcp-server/src/tools/docs/get-docs.ts | 2 +- .../executions/change-status-executions.ts | 1 + .../src/tools/executions/create-executions.ts | 5 +- .../src/tools/executions/get-executions.ts | 2 +- .../src/tools/executions/list-executions.ts | 2 +- .../status/get-executions-status.ts | 2 +- .../list-executions-transitions.ts | 2 +- .../retrieve-executions-transitions.ts | 2 +- .../src/tools/projects/create-projects.ts | 3 +- .../src/tools/projects/list-projects.ts | 3 +- .../src/tools/secrets/create-secrets.ts | 3 +- .../src/tools/secrets/list-secrets.ts | 2 +- .../src/tools/secrets/update-secrets.ts | 3 +- .../src/tools/sessions/chat-sessions.ts | 37 +++++++++++++ .../sessions/create-or-update-sessions.ts | 4 ++ .../src/tools/sessions/create-sessions.ts | 18 +++---- .../src/tools/sessions/get-sessions.ts | 2 +- .../src/tools/sessions/list-sessions.ts | 3 +- .../src/tools/sessions/render-sessions.ts | 36 +++++++++++++ .../src/tools/sessions/reset-sessions.ts | 6 ++- .../src/tools/sessions/update-sessions.ts | 4 ++ .../src/tools/tasks/create-or-update-tasks.ts | 54 +++++++++++++++++++ .../src/tools/tasks/create-tasks.ts | 54 +++++++++++++++++++ .../src/tools/users/create-or-update-users.ts | 3 +- .../src/tools/users/create-users.ts | 3 +- .../users/docs/bulk-delete-users-docs.ts | 1 + .../src/tools/users/docs/create-users-docs.ts | 4 +- .../src/tools/users/docs/list-users-docs.ts | 3 +- .../src/tools/users/docs/search-users-docs.ts | 8 ++- .../mcp-server/src/tools/users/get-users.ts | 2 +- .../mcp-server/src/tools/users/list-users.ts | 3 +- .../mcp-server/src/tools/users/reset-users.ts | 3 +- .../src/tools/users/update-users.ts | 3 +- 46 files changed, 367 insertions(+), 44 deletions(-) diff --git a/packages/mcp-server/src/tools/agents/create-agents.ts b/packages/mcp-server/src/tools/agents/create-agents.ts index 7ad94db0..9d5159c5 100644 --- a/packages/mcp-server/src/tools/agents/create-agents.ts +++ b/packages/mcp-server/src/tools/agents/create-agents.ts @@ -18,7 +18,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'create_agents', description: - "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nCreate Agent\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/agent',\n $defs: {\n agent: {\n type: 'object',\n title: 'Agent',\n properties: {\n id: {\n type: 'string',\n title: 'Id'\n },\n created_at: {\n type: 'string',\n title: 'Created At',\n format: 'date-time'\n },\n name: {\n type: 'string',\n title: 'Name'\n },\n updated_at: {\n type: 'string',\n title: 'Updated At',\n format: 'date-time'\n },\n about: {\n type: 'string',\n title: 'About'\n },\n canonical_name: {\n type: 'string',\n title: 'Canonical Name'\n },\n default_settings: {\n type: 'object',\n title: 'Default Settings'\n },\n default_system_template: {\n type: 'string',\n title: 'Default System Template'\n },\n instructions: {\n anyOf: [ {\n type: 'string'\n },\n {\n type: 'array',\n items: {\n type: 'string'\n }\n }\n ],\n title: 'Instructions'\n },\n metadata: {\n type: 'object',\n title: 'Metadata'\n },\n model: {\n type: 'string',\n title: 'Model'\n },\n project: {\n type: 'string',\n title: 'Project'\n }\n },\n required: [ 'id',\n 'created_at',\n 'name',\n 'updated_at'\n ]\n }\n }\n}\n```", + "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nCreate Agent\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/agent',\n $defs: {\n agent: {\n type: 'object',\n title: 'Agent',\n properties: {\n id: {\n type: 'string',\n title: 'Id'\n },\n created_at: {\n type: 'string',\n title: 'Created At',\n format: 'date-time'\n },\n name: {\n type: 'string',\n title: 'Name'\n },\n updated_at: {\n type: 'string',\n title: 'Updated At',\n format: 'date-time'\n },\n about: {\n type: 'string',\n title: 'About'\n },\n canonical_name: {\n type: 'string',\n title: 'Canonical Name'\n },\n default_settings: {\n type: 'object',\n title: 'Default Settings',\n additionalProperties: true\n },\n default_system_template: {\n type: 'string',\n title: 'Default System Template'\n },\n instructions: {\n anyOf: [ {\n type: 'string'\n },\n {\n type: 'array',\n items: {\n type: 'string'\n }\n }\n ],\n title: 'Instructions'\n },\n metadata: {\n type: 'object',\n title: 'Metadata',\n additionalProperties: true\n },\n model: {\n type: 'string',\n title: 'Model'\n },\n project: {\n type: 'string',\n title: 'Project'\n }\n },\n required: [ 'id',\n 'created_at',\n 'name',\n 'updated_at'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { @@ -37,6 +37,7 @@ export const tool: Tool = { default_settings: { type: 'object', title: 'Default Settings', + additionalProperties: true, }, default_system_template: { type: 'string', @@ -59,6 +60,7 @@ export const tool: Tool = { metadata: { type: 'object', title: 'Metadata', + additionalProperties: true, }, model: { type: 'string', diff --git a/packages/mcp-server/src/tools/agents/create-or-update-agents.ts b/packages/mcp-server/src/tools/agents/create-or-update-agents.ts index 91e3e75e..33c7fff4 100644 --- a/packages/mcp-server/src/tools/agents/create-or-update-agents.ts +++ b/packages/mcp-server/src/tools/agents/create-or-update-agents.ts @@ -18,7 +18,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'create_or_update_agents', description: - "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nCreate Or Update Agent\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/agent',\n $defs: {\n agent: {\n type: 'object',\n title: 'Agent',\n properties: {\n id: {\n type: 'string',\n title: 'Id'\n },\n created_at: {\n type: 'string',\n title: 'Created At',\n format: 'date-time'\n },\n name: {\n type: 'string',\n title: 'Name'\n },\n updated_at: {\n type: 'string',\n title: 'Updated At',\n format: 'date-time'\n },\n about: {\n type: 'string',\n title: 'About'\n },\n canonical_name: {\n type: 'string',\n title: 'Canonical Name'\n },\n default_settings: {\n type: 'object',\n title: 'Default Settings'\n },\n default_system_template: {\n type: 'string',\n title: 'Default System Template'\n },\n instructions: {\n anyOf: [ {\n type: 'string'\n },\n {\n type: 'array',\n items: {\n type: 'string'\n }\n }\n ],\n title: 'Instructions'\n },\n metadata: {\n type: 'object',\n title: 'Metadata'\n },\n model: {\n type: 'string',\n title: 'Model'\n },\n project: {\n type: 'string',\n title: 'Project'\n }\n },\n required: [ 'id',\n 'created_at',\n 'name',\n 'updated_at'\n ]\n }\n }\n}\n```", + "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nCreate Or Update Agent\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/agent',\n $defs: {\n agent: {\n type: 'object',\n title: 'Agent',\n properties: {\n id: {\n type: 'string',\n title: 'Id'\n },\n created_at: {\n type: 'string',\n title: 'Created At',\n format: 'date-time'\n },\n name: {\n type: 'string',\n title: 'Name'\n },\n updated_at: {\n type: 'string',\n title: 'Updated At',\n format: 'date-time'\n },\n about: {\n type: 'string',\n title: 'About'\n },\n canonical_name: {\n type: 'string',\n title: 'Canonical Name'\n },\n default_settings: {\n type: 'object',\n title: 'Default Settings',\n additionalProperties: true\n },\n default_system_template: {\n type: 'string',\n title: 'Default System Template'\n },\n instructions: {\n anyOf: [ {\n type: 'string'\n },\n {\n type: 'array',\n items: {\n type: 'string'\n }\n }\n ],\n title: 'Instructions'\n },\n metadata: {\n type: 'object',\n title: 'Metadata',\n additionalProperties: true\n },\n model: {\n type: 'string',\n title: 'Model'\n },\n project: {\n type: 'string',\n title: 'Project'\n }\n },\n required: [ 'id',\n 'created_at',\n 'name',\n 'updated_at'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { @@ -41,6 +41,7 @@ export const tool: Tool = { default_settings: { type: 'object', title: 'Default Settings', + additionalProperties: true, }, default_system_template: { type: 'string', @@ -63,6 +64,7 @@ export const tool: Tool = { metadata: { type: 'object', title: 'Metadata', + additionalProperties: true, }, model: { type: 'string', diff --git a/packages/mcp-server/src/tools/agents/docs/bulk-delete-agents-docs.ts b/packages/mcp-server/src/tools/agents/docs/bulk-delete-agents-docs.ts index d156add5..8876117f 100644 --- a/packages/mcp-server/src/tools/agents/docs/bulk-delete-agents-docs.ts +++ b/packages/mcp-server/src/tools/agents/docs/bulk-delete-agents-docs.ts @@ -33,6 +33,7 @@ export const tool: Tool = { metadata_filter: { type: 'object', title: 'Metadata Filter', + additionalProperties: true, }, jq_filter: { type: 'string', diff --git a/packages/mcp-server/src/tools/agents/docs/create-agents-docs.ts b/packages/mcp-server/src/tools/agents/docs/create-agents-docs.ts index 31df2976..1ec70257 100644 --- a/packages/mcp-server/src/tools/agents/docs/create-agents-docs.ts +++ b/packages/mcp-server/src/tools/agents/docs/create-agents-docs.ts @@ -18,7 +18,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'create_agents_docs', description: - "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nCreate Agent Doc\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/doc',\n $defs: {\n doc: {\n type: 'object',\n title: 'Doc',\n properties: {\n id: {\n type: 'string',\n title: 'Id'\n },\n content: {\n anyOf: [ {\n type: 'string'\n },\n {\n type: 'array',\n items: {\n type: 'string'\n }\n }\n ],\n title: 'Content'\n },\n created_at: {\n type: 'string',\n title: 'Created At',\n format: 'date-time'\n },\n title: {\n type: 'string',\n title: 'Title'\n },\n embedding_dimensions: {\n type: 'integer',\n title: 'Embedding Dimensions'\n },\n embedding_model: {\n type: 'string',\n title: 'Embedding Model'\n },\n embeddings: {\n anyOf: [ {\n type: 'array',\n items: {\n type: 'number'\n }\n },\n {\n type: 'array',\n items: {\n type: 'array',\n items: {\n type: 'number'\n }\n }\n }\n ],\n title: 'Embeddings'\n },\n language: {\n type: 'string',\n title: 'Language'\n },\n metadata: {\n type: 'object',\n title: 'Metadata'\n },\n modality: {\n type: 'string',\n title: 'Modality'\n }\n },\n required: [ 'id',\n 'content',\n 'created_at',\n 'title'\n ]\n }\n }\n}\n```", + "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nCreate Agent Doc\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/doc',\n $defs: {\n doc: {\n type: 'object',\n title: 'Doc',\n properties: {\n id: {\n type: 'string',\n title: 'Id'\n },\n content: {\n anyOf: [ {\n type: 'string'\n },\n {\n type: 'array',\n items: {\n type: 'string'\n }\n }\n ],\n title: 'Content'\n },\n created_at: {\n type: 'string',\n title: 'Created At',\n format: 'date-time'\n },\n title: {\n type: 'string',\n title: 'Title'\n },\n embedding_dimensions: {\n type: 'integer',\n title: 'Embedding Dimensions'\n },\n embedding_model: {\n type: 'string',\n title: 'Embedding Model'\n },\n embeddings: {\n anyOf: [ {\n type: 'array',\n items: {\n type: 'number'\n }\n },\n {\n type: 'array',\n items: {\n type: 'array',\n items: {\n type: 'number'\n }\n }\n }\n ],\n title: 'Embeddings'\n },\n language: {\n type: 'string',\n title: 'Language'\n },\n metadata: {\n type: 'object',\n title: 'Metadata',\n additionalProperties: true\n },\n modality: {\n type: 'string',\n title: 'Modality'\n }\n },\n required: [ 'id',\n 'content',\n 'created_at',\n 'title'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { @@ -49,6 +49,7 @@ export const tool: Tool = { connection_pool: { type: 'object', title: 'Connection Pool', + additionalProperties: true, }, embed_instruction: { type: 'string', @@ -57,6 +58,7 @@ export const tool: Tool = { metadata: { type: 'object', title: 'Metadata', + additionalProperties: true, }, jq_filter: { type: 'string', diff --git a/packages/mcp-server/src/tools/agents/docs/list-agents-docs.ts b/packages/mcp-server/src/tools/agents/docs/list-agents-docs.ts index 15a6817d..f504eaf8 100644 --- a/packages/mcp-server/src/tools/agents/docs/list-agents-docs.ts +++ b/packages/mcp-server/src/tools/agents/docs/list-agents-docs.ts @@ -18,7 +18,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'list_agents_docs', description: - "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nList Agent Docs\n\n# Response Schema\n```json\n{\n type: 'object',\n title: 'ListResponse[Doc]',\n properties: {\n items: {\n type: 'array',\n title: 'Items',\n items: {\n $ref: '#/$defs/doc'\n }\n }\n },\n required: [ 'items'\n ],\n $defs: {\n doc: {\n type: 'object',\n title: 'Doc',\n properties: {\n id: {\n type: 'string',\n title: 'Id'\n },\n content: {\n anyOf: [ {\n type: 'string'\n },\n {\n type: 'array',\n items: {\n type: 'string'\n }\n }\n ],\n title: 'Content'\n },\n created_at: {\n type: 'string',\n title: 'Created At',\n format: 'date-time'\n },\n title: {\n type: 'string',\n title: 'Title'\n },\n embedding_dimensions: {\n type: 'integer',\n title: 'Embedding Dimensions'\n },\n embedding_model: {\n type: 'string',\n title: 'Embedding Model'\n },\n embeddings: {\n anyOf: [ {\n type: 'array',\n items: {\n type: 'number'\n }\n },\n {\n type: 'array',\n items: {\n type: 'array',\n items: {\n type: 'number'\n }\n }\n }\n ],\n title: 'Embeddings'\n },\n language: {\n type: 'string',\n title: 'Language'\n },\n metadata: {\n type: 'object',\n title: 'Metadata'\n },\n modality: {\n type: 'string',\n title: 'Modality'\n }\n },\n required: [ 'id',\n 'content',\n 'created_at',\n 'title'\n ]\n }\n }\n}\n```", + "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nList Agent Docs\n\n# Response Schema\n```json\n{\n type: 'object',\n title: 'ListResponse[Doc]',\n properties: {\n items: {\n type: 'array',\n title: 'Items',\n items: {\n $ref: '#/$defs/doc'\n }\n }\n },\n required: [ 'items'\n ],\n $defs: {\n doc: {\n type: 'object',\n title: 'Doc',\n properties: {\n id: {\n type: 'string',\n title: 'Id'\n },\n content: {\n anyOf: [ {\n type: 'string'\n },\n {\n type: 'array',\n items: {\n type: 'string'\n }\n }\n ],\n title: 'Content'\n },\n created_at: {\n type: 'string',\n title: 'Created At',\n format: 'date-time'\n },\n title: {\n type: 'string',\n title: 'Title'\n },\n embedding_dimensions: {\n type: 'integer',\n title: 'Embedding Dimensions'\n },\n embedding_model: {\n type: 'string',\n title: 'Embedding Model'\n },\n embeddings: {\n anyOf: [ {\n type: 'array',\n items: {\n type: 'number'\n }\n },\n {\n type: 'array',\n items: {\n type: 'array',\n items: {\n type: 'number'\n }\n }\n }\n ],\n title: 'Embeddings'\n },\n language: {\n type: 'string',\n title: 'Language'\n },\n metadata: {\n type: 'object',\n title: 'Metadata',\n additionalProperties: true\n },\n modality: {\n type: 'string',\n title: 'Modality'\n }\n },\n required: [ 'id',\n 'content',\n 'created_at',\n 'title'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { @@ -42,6 +42,7 @@ export const tool: Tool = { metadata_filter: { type: 'object', title: 'MetadataFilter', + additionalProperties: true, }, offset: { type: 'integer', diff --git a/packages/mcp-server/src/tools/agents/docs/search-agents-docs.ts b/packages/mcp-server/src/tools/agents/docs/search-agents-docs.ts index 9b020a41..b74d2130 100644 --- a/packages/mcp-server/src/tools/agents/docs/search-agents-docs.ts +++ b/packages/mcp-server/src/tools/agents/docs/search-agents-docs.ts @@ -18,7 +18,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'search_agents_docs', description: - "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nSearches for documents associated with a specific agent.\n\nParameters:\n x_developer_id (UUID): The unique identifier of the developer associated with the agent.\n search_params (TextOnlyDocSearchRequest | VectorDocSearchRequest | HybridDocSearchRequest): The parameters for the search.\n agent_id (UUID): The umnique identifier of the agent associated with the documents.\nReturns:\n DocSearchResponse: The search results.\n\n# Response Schema\n```json\n{\n type: 'object',\n title: 'DocSearchResponse',\n properties: {\n docs: {\n type: 'array',\n title: 'Docs',\n items: {\n $ref: '#/$defs/doc_reference'\n }\n },\n time: {\n type: 'number',\n title: 'Time'\n }\n },\n required: [ 'docs',\n 'time'\n ],\n $defs: {\n doc_reference: {\n type: 'object',\n title: 'DocReference',\n properties: {\n id: {\n type: 'string',\n title: 'Id'\n },\n owner: {\n $ref: '#/$defs/doc_owner'\n },\n snippet: {\n $ref: '#/$defs/snippet'\n },\n distance: {\n type: 'number',\n title: 'Distance'\n },\n metadata: {\n type: 'object',\n title: 'Metadata'\n },\n title: {\n type: 'string',\n title: 'Title'\n }\n },\n required: [ 'id',\n 'owner',\n 'snippet'\n ]\n },\n doc_owner: {\n type: 'object',\n title: 'DocOwner',\n properties: {\n id: {\n type: 'string',\n title: 'Id'\n },\n role: {\n type: 'string',\n title: 'Role',\n enum: [ 'user',\n 'agent'\n ]\n }\n },\n required: [ 'id',\n 'role'\n ]\n },\n snippet: {\n type: 'object',\n title: 'Snippet',\n properties: {\n content: {\n type: 'string',\n title: 'Content'\n },\n index: {\n type: 'integer',\n title: 'Index'\n },\n embedding: {\n type: 'array',\n title: 'Embedding',\n items: {\n type: 'number'\n }\n }\n },\n required: [ 'content',\n 'index'\n ]\n }\n }\n}\n```", + "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nSearches for documents associated with a specific agent.\n\nParameters:\n x_developer_id (UUID): The unique identifier of the developer associated with the agent.\n search_params (TextOnlyDocSearchRequest | VectorDocSearchRequest | HybridDocSearchRequest): The parameters for the search.\n agent_id (UUID): The umnique identifier of the agent associated with the documents.\nReturns:\n DocSearchResponse: The search results.\n\n# Response Schema\n```json\n{\n type: 'object',\n title: 'DocSearchResponse',\n properties: {\n docs: {\n type: 'array',\n title: 'Docs',\n items: {\n $ref: '#/$defs/doc_reference'\n }\n },\n time: {\n type: 'number',\n title: 'Time'\n }\n },\n required: [ 'docs',\n 'time'\n ],\n $defs: {\n doc_reference: {\n type: 'object',\n title: 'DocReference',\n properties: {\n id: {\n type: 'string',\n title: 'Id'\n },\n owner: {\n $ref: '#/$defs/doc_owner'\n },\n snippet: {\n $ref: '#/$defs/snippet'\n },\n distance: {\n type: 'number',\n title: 'Distance'\n },\n metadata: {\n type: 'object',\n title: 'Metadata',\n additionalProperties: true\n },\n title: {\n type: 'string',\n title: 'Title'\n }\n },\n required: [ 'id',\n 'owner',\n 'snippet'\n ]\n },\n doc_owner: {\n type: 'object',\n title: 'DocOwner',\n properties: {\n id: {\n type: 'string',\n title: 'Id'\n },\n role: {\n type: 'string',\n title: 'Role',\n enum: [ 'user',\n 'agent'\n ]\n }\n },\n required: [ 'id',\n 'role'\n ]\n },\n snippet: {\n type: 'object',\n title: 'Snippet',\n properties: {\n content: {\n type: 'string',\n title: 'Content'\n },\n index: {\n type: 'integer',\n title: 'Index'\n },\n embedding: {\n type: 'array',\n title: 'Embedding',\n items: {\n type: 'number'\n }\n }\n },\n required: [ 'content',\n 'index'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', anyOf: [ @@ -36,6 +36,7 @@ export const tool: Tool = { connection_pool: { type: 'object', title: 'Connection Pool', + additionalProperties: true, }, include_embeddings: { type: 'boolean', @@ -52,6 +53,7 @@ export const tool: Tool = { metadata_filter: { type: 'object', title: 'Metadata Filter', + additionalProperties: true, }, trigram_similarity_threshold: { type: 'number', @@ -77,6 +79,7 @@ export const tool: Tool = { connection_pool: { type: 'object', title: 'Connection Pool', + additionalProperties: true, }, confidence: { type: 'number', @@ -93,6 +96,7 @@ export const tool: Tool = { metadata_filter: { type: 'object', title: 'Metadata Filter', + additionalProperties: true, }, mmr_strength: { type: 'number', @@ -122,6 +126,7 @@ export const tool: Tool = { connection_pool: { type: 'object', title: 'Connection Pool', + additionalProperties: true, }, alpha: { type: 'number', @@ -150,6 +155,7 @@ export const tool: Tool = { metadata_filter: { type: 'object', title: 'Metadata Filter', + additionalProperties: true, }, mmr_strength: { type: 'number', diff --git a/packages/mcp-server/src/tools/agents/get-agents.ts b/packages/mcp-server/src/tools/agents/get-agents.ts index 3b45aada..7a4b467e 100644 --- a/packages/mcp-server/src/tools/agents/get-agents.ts +++ b/packages/mcp-server/src/tools/agents/get-agents.ts @@ -18,7 +18,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'get_agents', description: - "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nGet Agent Details\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/agent',\n $defs: {\n agent: {\n type: 'object',\n title: 'Agent',\n properties: {\n id: {\n type: 'string',\n title: 'Id'\n },\n created_at: {\n type: 'string',\n title: 'Created At',\n format: 'date-time'\n },\n name: {\n type: 'string',\n title: 'Name'\n },\n updated_at: {\n type: 'string',\n title: 'Updated At',\n format: 'date-time'\n },\n about: {\n type: 'string',\n title: 'About'\n },\n canonical_name: {\n type: 'string',\n title: 'Canonical Name'\n },\n default_settings: {\n type: 'object',\n title: 'Default Settings'\n },\n default_system_template: {\n type: 'string',\n title: 'Default System Template'\n },\n instructions: {\n anyOf: [ {\n type: 'string'\n },\n {\n type: 'array',\n items: {\n type: 'string'\n }\n }\n ],\n title: 'Instructions'\n },\n metadata: {\n type: 'object',\n title: 'Metadata'\n },\n model: {\n type: 'string',\n title: 'Model'\n },\n project: {\n type: 'string',\n title: 'Project'\n }\n },\n required: [ 'id',\n 'created_at',\n 'name',\n 'updated_at'\n ]\n }\n }\n}\n```", + "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nGet Agent Details\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/agent',\n $defs: {\n agent: {\n type: 'object',\n title: 'Agent',\n properties: {\n id: {\n type: 'string',\n title: 'Id'\n },\n created_at: {\n type: 'string',\n title: 'Created At',\n format: 'date-time'\n },\n name: {\n type: 'string',\n title: 'Name'\n },\n updated_at: {\n type: 'string',\n title: 'Updated At',\n format: 'date-time'\n },\n about: {\n type: 'string',\n title: 'About'\n },\n canonical_name: {\n type: 'string',\n title: 'Canonical Name'\n },\n default_settings: {\n type: 'object',\n title: 'Default Settings',\n additionalProperties: true\n },\n default_system_template: {\n type: 'string',\n title: 'Default System Template'\n },\n instructions: {\n anyOf: [ {\n type: 'string'\n },\n {\n type: 'array',\n items: {\n type: 'string'\n }\n }\n ],\n title: 'Instructions'\n },\n metadata: {\n type: 'object',\n title: 'Metadata',\n additionalProperties: true\n },\n model: {\n type: 'string',\n title: 'Model'\n },\n project: {\n type: 'string',\n title: 'Project'\n }\n },\n required: [ 'id',\n 'created_at',\n 'name',\n 'updated_at'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/agents/list-agents.ts b/packages/mcp-server/src/tools/agents/list-agents.ts index ce8ad442..1049f1c8 100644 --- a/packages/mcp-server/src/tools/agents/list-agents.ts +++ b/packages/mcp-server/src/tools/agents/list-agents.ts @@ -18,7 +18,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'list_agents', description: - "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nList Agents\n\n# Response Schema\n```json\n{\n type: 'object',\n title: 'ListResponse[Agent]',\n properties: {\n items: {\n type: 'array',\n title: 'Items',\n items: {\n $ref: '#/$defs/agent'\n }\n }\n },\n required: [ 'items'\n ],\n $defs: {\n agent: {\n type: 'object',\n title: 'Agent',\n properties: {\n id: {\n type: 'string',\n title: 'Id'\n },\n created_at: {\n type: 'string',\n title: 'Created At',\n format: 'date-time'\n },\n name: {\n type: 'string',\n title: 'Name'\n },\n updated_at: {\n type: 'string',\n title: 'Updated At',\n format: 'date-time'\n },\n about: {\n type: 'string',\n title: 'About'\n },\n canonical_name: {\n type: 'string',\n title: 'Canonical Name'\n },\n default_settings: {\n type: 'object',\n title: 'Default Settings'\n },\n default_system_template: {\n type: 'string',\n title: 'Default System Template'\n },\n instructions: {\n anyOf: [ {\n type: 'string'\n },\n {\n type: 'array',\n items: {\n type: 'string'\n }\n }\n ],\n title: 'Instructions'\n },\n metadata: {\n type: 'object',\n title: 'Metadata'\n },\n model: {\n type: 'string',\n title: 'Model'\n },\n project: {\n type: 'string',\n title: 'Project'\n }\n },\n required: [ 'id',\n 'created_at',\n 'name',\n 'updated_at'\n ]\n }\n }\n}\n```", + "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nList Agents\n\n# Response Schema\n```json\n{\n type: 'object',\n title: 'ListResponse[Agent]',\n properties: {\n items: {\n type: 'array',\n title: 'Items',\n items: {\n $ref: '#/$defs/agent'\n }\n }\n },\n required: [ 'items'\n ],\n $defs: {\n agent: {\n type: 'object',\n title: 'Agent',\n properties: {\n id: {\n type: 'string',\n title: 'Id'\n },\n created_at: {\n type: 'string',\n title: 'Created At',\n format: 'date-time'\n },\n name: {\n type: 'string',\n title: 'Name'\n },\n updated_at: {\n type: 'string',\n title: 'Updated At',\n format: 'date-time'\n },\n about: {\n type: 'string',\n title: 'About'\n },\n canonical_name: {\n type: 'string',\n title: 'Canonical Name'\n },\n default_settings: {\n type: 'object',\n title: 'Default Settings',\n additionalProperties: true\n },\n default_system_template: {\n type: 'string',\n title: 'Default System Template'\n },\n instructions: {\n anyOf: [ {\n type: 'string'\n },\n {\n type: 'array',\n items: {\n type: 'string'\n }\n }\n ],\n title: 'Instructions'\n },\n metadata: {\n type: 'object',\n title: 'Metadata',\n additionalProperties: true\n },\n model: {\n type: 'string',\n title: 'Model'\n },\n project: {\n type: 'string',\n title: 'Project'\n }\n },\n required: [ 'id',\n 'created_at',\n 'name',\n 'updated_at'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { @@ -34,6 +34,7 @@ export const tool: Tool = { metadata_filter: { type: 'object', title: 'MetadataFilter', + additionalProperties: true, }, offset: { type: 'integer', diff --git a/packages/mcp-server/src/tools/agents/reset-agents.ts b/packages/mcp-server/src/tools/agents/reset-agents.ts index 86c6782b..99263f7b 100644 --- a/packages/mcp-server/src/tools/agents/reset-agents.ts +++ b/packages/mcp-server/src/tools/agents/reset-agents.ts @@ -18,7 +18,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'reset_agents', description: - "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nUpdate Agent\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/agent',\n $defs: {\n agent: {\n type: 'object',\n title: 'Agent',\n properties: {\n id: {\n type: 'string',\n title: 'Id'\n },\n created_at: {\n type: 'string',\n title: 'Created At',\n format: 'date-time'\n },\n name: {\n type: 'string',\n title: 'Name'\n },\n updated_at: {\n type: 'string',\n title: 'Updated At',\n format: 'date-time'\n },\n about: {\n type: 'string',\n title: 'About'\n },\n canonical_name: {\n type: 'string',\n title: 'Canonical Name'\n },\n default_settings: {\n type: 'object',\n title: 'Default Settings'\n },\n default_system_template: {\n type: 'string',\n title: 'Default System Template'\n },\n instructions: {\n anyOf: [ {\n type: 'string'\n },\n {\n type: 'array',\n items: {\n type: 'string'\n }\n }\n ],\n title: 'Instructions'\n },\n metadata: {\n type: 'object',\n title: 'Metadata'\n },\n model: {\n type: 'string',\n title: 'Model'\n },\n project: {\n type: 'string',\n title: 'Project'\n }\n },\n required: [ 'id',\n 'created_at',\n 'name',\n 'updated_at'\n ]\n }\n }\n}\n```", + "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nUpdate Agent\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/agent',\n $defs: {\n agent: {\n type: 'object',\n title: 'Agent',\n properties: {\n id: {\n type: 'string',\n title: 'Id'\n },\n created_at: {\n type: 'string',\n title: 'Created At',\n format: 'date-time'\n },\n name: {\n type: 'string',\n title: 'Name'\n },\n updated_at: {\n type: 'string',\n title: 'Updated At',\n format: 'date-time'\n },\n about: {\n type: 'string',\n title: 'About'\n },\n canonical_name: {\n type: 'string',\n title: 'Canonical Name'\n },\n default_settings: {\n type: 'object',\n title: 'Default Settings',\n additionalProperties: true\n },\n default_system_template: {\n type: 'string',\n title: 'Default System Template'\n },\n instructions: {\n anyOf: [ {\n type: 'string'\n },\n {\n type: 'array',\n items: {\n type: 'string'\n }\n }\n ],\n title: 'Instructions'\n },\n metadata: {\n type: 'object',\n title: 'Metadata',\n additionalProperties: true\n },\n model: {\n type: 'string',\n title: 'Model'\n },\n project: {\n type: 'string',\n title: 'Project'\n }\n },\n required: [ 'id',\n 'created_at',\n 'name',\n 'updated_at'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { @@ -41,6 +41,7 @@ export const tool: Tool = { default_settings: { type: 'object', title: 'Default Settings', + additionalProperties: true, }, default_system_template: { type: 'string', @@ -63,6 +64,7 @@ export const tool: Tool = { metadata: { type: 'object', title: 'Metadata', + additionalProperties: true, }, model: { type: 'string', diff --git a/packages/mcp-server/src/tools/agents/tools/create-agents-tools.ts b/packages/mcp-server/src/tools/agents/tools/create-agents-tools.ts index 9ceab947..b1f968dd 100644 --- a/packages/mcp-server/src/tools/agents/tools/create-agents-tools.ts +++ b/packages/mcp-server/src/tools/agents/tools/create-agents-tools.ts @@ -62,14 +62,17 @@ export const tool: Tool = { cookies: { type: 'object', title: 'Cookies', + additionalProperties: true, }, data: { type: 'object', title: 'Data', + additionalProperties: true, }, files: { type: 'object', title: 'Files', + additionalProperties: true, }, follow_redirects: { type: 'boolean', @@ -78,6 +81,7 @@ export const tool: Tool = { headers: { type: 'object', title: 'Headers', + additionalProperties: true, }, include_response_content: { type: 'boolean', @@ -86,6 +90,7 @@ export const tool: Tool = { json: { type: 'object', title: 'Json', + additionalProperties: true, }, params: { anyOf: [ @@ -94,6 +99,7 @@ export const tool: Tool = { }, { type: 'object', + additionalProperties: true, }, ], title: 'Params', @@ -106,6 +112,7 @@ export const tool: Tool = { properties: { type: 'object', title: 'Properties', + additionalProperties: true, }, additionalProperties: { type: 'boolean', @@ -128,10 +135,12 @@ export const tool: Tool = { schema: { type: 'object', title: 'Schema', + additionalProperties: true, }, secrets: { type: 'object', title: 'Secrets', + additionalProperties: true, }, timeout: { type: 'integer', @@ -285,14 +294,17 @@ export const tool: Tool = { description: { type: 'object', title: 'Description', + additionalProperties: true, }, name: { type: 'object', title: 'Name', + additionalProperties: true, }, parameters: { type: 'object', title: 'Parameters', + additionalProperties: true, }, }, }, @@ -303,6 +315,7 @@ export const tool: Tool = { arguments: { type: 'object', title: 'Arguments', + additionalProperties: true, }, method: { type: 'string', @@ -316,6 +329,7 @@ export const tool: Tool = { setup: { type: 'object', title: 'Setup', + additionalProperties: true, }, }, }, @@ -475,6 +489,7 @@ export const tool: Tool = { params: { type: 'object', title: 'Params', + additionalProperties: true, }, }, required: ['url'], @@ -511,6 +526,7 @@ export const tool: Tool = { setup: { type: 'object', title: 'Setup', + additionalProperties: true, }, }, }, @@ -803,6 +819,7 @@ export const tool: Tool = { browserSettings: { type: 'object', title: 'Browsersettings', + additionalProperties: true, }, extensionId: { type: 'string', @@ -825,6 +842,7 @@ export const tool: Tool = { type: 'array', items: { type: 'object', + additionalProperties: true, }, }, ], @@ -1018,6 +1036,7 @@ export const tool: Tool = { title: 'Coordinate', items: { type: 'object', + additionalProperties: true, }, }, text: { @@ -1079,6 +1098,7 @@ export const tool: Tool = { params: { type: 'object', title: 'Params', + additionalProperties: true, }, }, required: ['file'], @@ -1095,6 +1115,7 @@ export const tool: Tool = { params: { type: 'object', title: 'Params', + additionalProperties: true, }, }, required: ['llamaparse_api_key'], @@ -1119,6 +1140,7 @@ export const tool: Tool = { setup: { type: 'object', title: 'Setup', + additionalProperties: true, }, }, }, @@ -1191,6 +1213,7 @@ export const tool: Tool = { upload_params: { type: 'object', title: 'Upload Params', + additionalProperties: true, }, }, required: ['file'], @@ -1215,6 +1238,7 @@ export const tool: Tool = { params: { type: 'object', title: 'Params', + additionalProperties: true, }, }, required: ['cloudinary_api_key', 'cloudinary_api_secret', 'cloudinary_cloud_name'], @@ -1256,6 +1280,7 @@ export const tool: Tool = { title: 'Transformation', items: { type: 'object', + additionalProperties: true, }, }, return_base64: { @@ -1285,6 +1310,7 @@ export const tool: Tool = { setup: { type: 'object', title: 'Setup', + additionalProperties: true, }, }, }, @@ -1363,6 +1389,7 @@ export const tool: Tool = { partition_params: { type: 'object', title: 'Partition Params', + additionalProperties: true, }, }, required: ['file'], @@ -1379,6 +1406,7 @@ export const tool: Tool = { retry_config: { type: 'object', title: 'Retry Config', + additionalProperties: true, }, server: { type: 'string', @@ -1395,6 +1423,7 @@ export const tool: Tool = { url_params: { type: 'object', title: 'Url Params', + additionalProperties: true, }, }, required: ['unstructured_api_key'], @@ -1495,6 +1524,7 @@ export const tool: Tool = { arguments: { type: 'object', title: 'Arguments', + additionalProperties: true, }, resource_id: { type: 'string', diff --git a/packages/mcp-server/src/tools/agents/tools/reset-agents-tools.ts b/packages/mcp-server/src/tools/agents/tools/reset-agents-tools.ts index 1a4b680a..e17a4822 100644 --- a/packages/mcp-server/src/tools/agents/tools/reset-agents-tools.ts +++ b/packages/mcp-server/src/tools/agents/tools/reset-agents-tools.ts @@ -66,14 +66,17 @@ export const tool: Tool = { cookies: { type: 'object', title: 'Cookies', + additionalProperties: true, }, data: { type: 'object', title: 'Data', + additionalProperties: true, }, files: { type: 'object', title: 'Files', + additionalProperties: true, }, follow_redirects: { type: 'boolean', @@ -82,6 +85,7 @@ export const tool: Tool = { headers: { type: 'object', title: 'Headers', + additionalProperties: true, }, include_response_content: { type: 'boolean', @@ -90,6 +94,7 @@ export const tool: Tool = { json: { type: 'object', title: 'Json', + additionalProperties: true, }, params: { anyOf: [ @@ -98,6 +103,7 @@ export const tool: Tool = { }, { type: 'object', + additionalProperties: true, }, ], title: 'Params', @@ -110,6 +116,7 @@ export const tool: Tool = { properties: { type: 'object', title: 'Properties', + additionalProperties: true, }, additionalProperties: { type: 'boolean', @@ -132,10 +139,12 @@ export const tool: Tool = { schema: { type: 'object', title: 'Schema', + additionalProperties: true, }, secrets: { type: 'object', title: 'Secrets', + additionalProperties: true, }, timeout: { type: 'integer', @@ -289,14 +298,17 @@ export const tool: Tool = { description: { type: 'object', title: 'Description', + additionalProperties: true, }, name: { type: 'object', title: 'Name', + additionalProperties: true, }, parameters: { type: 'object', title: 'Parameters', + additionalProperties: true, }, }, }, @@ -307,6 +319,7 @@ export const tool: Tool = { arguments: { type: 'object', title: 'Arguments', + additionalProperties: true, }, method: { type: 'string', @@ -320,6 +333,7 @@ export const tool: Tool = { setup: { type: 'object', title: 'Setup', + additionalProperties: true, }, }, }, @@ -479,6 +493,7 @@ export const tool: Tool = { params: { type: 'object', title: 'Params', + additionalProperties: true, }, }, required: ['url'], @@ -515,6 +530,7 @@ export const tool: Tool = { setup: { type: 'object', title: 'Setup', + additionalProperties: true, }, }, }, @@ -807,6 +823,7 @@ export const tool: Tool = { browserSettings: { type: 'object', title: 'Browsersettings', + additionalProperties: true, }, extensionId: { type: 'string', @@ -829,6 +846,7 @@ export const tool: Tool = { type: 'array', items: { type: 'object', + additionalProperties: true, }, }, ], @@ -1022,6 +1040,7 @@ export const tool: Tool = { title: 'Coordinate', items: { type: 'object', + additionalProperties: true, }, }, text: { @@ -1083,6 +1102,7 @@ export const tool: Tool = { params: { type: 'object', title: 'Params', + additionalProperties: true, }, }, required: ['file'], @@ -1099,6 +1119,7 @@ export const tool: Tool = { params: { type: 'object', title: 'Params', + additionalProperties: true, }, }, required: ['llamaparse_api_key'], @@ -1123,6 +1144,7 @@ export const tool: Tool = { setup: { type: 'object', title: 'Setup', + additionalProperties: true, }, }, }, @@ -1195,6 +1217,7 @@ export const tool: Tool = { upload_params: { type: 'object', title: 'Upload Params', + additionalProperties: true, }, }, required: ['file'], @@ -1219,6 +1242,7 @@ export const tool: Tool = { params: { type: 'object', title: 'Params', + additionalProperties: true, }, }, required: ['cloudinary_api_key', 'cloudinary_api_secret', 'cloudinary_cloud_name'], @@ -1260,6 +1284,7 @@ export const tool: Tool = { title: 'Transformation', items: { type: 'object', + additionalProperties: true, }, }, return_base64: { @@ -1289,6 +1314,7 @@ export const tool: Tool = { setup: { type: 'object', title: 'Setup', + additionalProperties: true, }, }, }, @@ -1367,6 +1393,7 @@ export const tool: Tool = { partition_params: { type: 'object', title: 'Partition Params', + additionalProperties: true, }, }, required: ['file'], @@ -1383,6 +1410,7 @@ export const tool: Tool = { retry_config: { type: 'object', title: 'Retry Config', + additionalProperties: true, }, server: { type: 'string', @@ -1399,6 +1427,7 @@ export const tool: Tool = { url_params: { type: 'object', title: 'Url Params', + additionalProperties: true, }, }, required: ['unstructured_api_key'], @@ -1499,6 +1528,7 @@ export const tool: Tool = { arguments: { type: 'object', title: 'Arguments', + additionalProperties: true, }, resource_id: { type: 'string', diff --git a/packages/mcp-server/src/tools/agents/tools/update-agents-tools.ts b/packages/mcp-server/src/tools/agents/tools/update-agents-tools.ts index 9513e78b..6f07a5c9 100644 --- a/packages/mcp-server/src/tools/agents/tools/update-agents-tools.ts +++ b/packages/mcp-server/src/tools/agents/tools/update-agents-tools.ts @@ -40,14 +40,17 @@ export const tool: Tool = { cookies: { type: 'object', title: 'Cookies', + additionalProperties: true, }, data: { type: 'object', title: 'Data', + additionalProperties: true, }, files: { type: 'object', title: 'Files', + additionalProperties: true, }, follow_redirects: { type: 'boolean', @@ -56,6 +59,7 @@ export const tool: Tool = { headers: { type: 'object', title: 'Headers', + additionalProperties: true, }, include_response_content: { type: 'boolean', @@ -64,6 +68,7 @@ export const tool: Tool = { json: { type: 'object', title: 'Json', + additionalProperties: true, }, method: { type: 'string', @@ -77,6 +82,7 @@ export const tool: Tool = { }, { type: 'object', + additionalProperties: true, }, ], title: 'Params', @@ -93,6 +99,7 @@ export const tool: Tool = { properties: { type: 'object', title: 'Properties', + additionalProperties: true, }, required: { type: 'array', @@ -110,10 +117,12 @@ export const tool: Tool = { schema: { type: 'object', title: 'Schema', + additionalProperties: true, }, secrets: { type: 'object', title: 'Secrets', + additionalProperties: true, }, timeout: { type: 'integer', @@ -184,6 +193,7 @@ export const tool: Tool = { arguments: { type: 'object', title: 'Arguments', + additionalProperties: true, }, method: { type: 'string', @@ -197,6 +207,7 @@ export const tool: Tool = { setup: { type: 'object', title: 'Setup', + additionalProperties: true, }, }, }, @@ -318,6 +329,7 @@ export const tool: Tool = { params: { type: 'object', title: 'Params', + additionalProperties: true, }, url: { type: 'string', @@ -380,6 +392,7 @@ export const tool: Tool = { setup: { type: 'object', title: 'Setup', + additionalProperties: true, }, }, }, @@ -722,6 +735,7 @@ export const tool: Tool = { title: 'Coordinate', items: { type: 'object', + additionalProperties: true, }, }, text: { @@ -780,6 +794,7 @@ export const tool: Tool = { params: { type: 'object', title: 'Params', + additionalProperties: true, }, }, }, @@ -804,6 +819,7 @@ export const tool: Tool = { params: { type: 'object', title: 'Params', + additionalProperties: true, }, }, }, @@ -851,6 +867,7 @@ export const tool: Tool = { setup: { type: 'object', title: 'Setup', + additionalProperties: true, }, }, }, @@ -879,6 +896,7 @@ export const tool: Tool = { upload_params: { type: 'object', title: 'Upload Params', + additionalProperties: true, }, }, }, @@ -912,6 +930,7 @@ export const tool: Tool = { params: { type: 'object', title: 'Params', + additionalProperties: true, }, }, }, @@ -940,6 +959,7 @@ export const tool: Tool = { title: 'Transformation', items: { type: 'object', + additionalProperties: true, }, }, }, @@ -974,6 +994,7 @@ export const tool: Tool = { params: { type: 'object', title: 'Params', + additionalProperties: true, }, }, }, @@ -1032,6 +1053,7 @@ export const tool: Tool = { setup: { type: 'object', title: 'Setup', + additionalProperties: true, }, }, }, @@ -1056,6 +1078,7 @@ export const tool: Tool = { partition_params: { type: 'object', title: 'Partition Params', + additionalProperties: true, }, }, }, @@ -1076,6 +1099,7 @@ export const tool: Tool = { retry_config: { type: 'object', title: 'Retry Config', + additionalProperties: true, }, server: { type: 'string', @@ -1096,6 +1120,7 @@ export const tool: Tool = { url_params: { type: 'object', title: 'Url Params', + additionalProperties: true, }, }, }, @@ -1174,6 +1199,7 @@ export const tool: Tool = { arguments: { type: 'object', title: 'Arguments', + additionalProperties: true, }, operation: { type: 'string', @@ -1248,14 +1274,17 @@ export const tool: Tool = { description: { type: 'object', title: 'Description', + additionalProperties: true, }, name: { type: 'object', title: 'Name', + additionalProperties: true, }, parameters: { type: 'object', title: 'Parameters', + additionalProperties: true, }, }, }, @@ -1300,6 +1329,7 @@ export const tool: Tool = { browserSettings: { type: 'object', title: 'Browsersettings', + additionalProperties: true, }, extensionId: { type: 'string', @@ -1322,6 +1352,7 @@ export const tool: Tool = { type: 'array', items: { type: 'object', + additionalProperties: true, }, }, ], diff --git a/packages/mcp-server/src/tools/agents/update-agents.ts b/packages/mcp-server/src/tools/agents/update-agents.ts index d8cc3ac3..09217731 100644 --- a/packages/mcp-server/src/tools/agents/update-agents.ts +++ b/packages/mcp-server/src/tools/agents/update-agents.ts @@ -18,7 +18,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'update_agents', description: - "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nPatch Agent\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/agent',\n $defs: {\n agent: {\n type: 'object',\n title: 'Agent',\n properties: {\n id: {\n type: 'string',\n title: 'Id'\n },\n created_at: {\n type: 'string',\n title: 'Created At',\n format: 'date-time'\n },\n name: {\n type: 'string',\n title: 'Name'\n },\n updated_at: {\n type: 'string',\n title: 'Updated At',\n format: 'date-time'\n },\n about: {\n type: 'string',\n title: 'About'\n },\n canonical_name: {\n type: 'string',\n title: 'Canonical Name'\n },\n default_settings: {\n type: 'object',\n title: 'Default Settings'\n },\n default_system_template: {\n type: 'string',\n title: 'Default System Template'\n },\n instructions: {\n anyOf: [ {\n type: 'string'\n },\n {\n type: 'array',\n items: {\n type: 'string'\n }\n }\n ],\n title: 'Instructions'\n },\n metadata: {\n type: 'object',\n title: 'Metadata'\n },\n model: {\n type: 'string',\n title: 'Model'\n },\n project: {\n type: 'string',\n title: 'Project'\n }\n },\n required: [ 'id',\n 'created_at',\n 'name',\n 'updated_at'\n ]\n }\n }\n}\n```", + "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nPatch Agent\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/agent',\n $defs: {\n agent: {\n type: 'object',\n title: 'Agent',\n properties: {\n id: {\n type: 'string',\n title: 'Id'\n },\n created_at: {\n type: 'string',\n title: 'Created At',\n format: 'date-time'\n },\n name: {\n type: 'string',\n title: 'Name'\n },\n updated_at: {\n type: 'string',\n title: 'Updated At',\n format: 'date-time'\n },\n about: {\n type: 'string',\n title: 'About'\n },\n canonical_name: {\n type: 'string',\n title: 'Canonical Name'\n },\n default_settings: {\n type: 'object',\n title: 'Default Settings',\n additionalProperties: true\n },\n default_system_template: {\n type: 'string',\n title: 'Default System Template'\n },\n instructions: {\n anyOf: [ {\n type: 'string'\n },\n {\n type: 'array',\n items: {\n type: 'string'\n }\n }\n ],\n title: 'Instructions'\n },\n metadata: {\n type: 'object',\n title: 'Metadata',\n additionalProperties: true\n },\n model: {\n type: 'string',\n title: 'Model'\n },\n project: {\n type: 'string',\n title: 'Project'\n }\n },\n required: [ 'id',\n 'created_at',\n 'name',\n 'updated_at'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { @@ -37,6 +37,7 @@ export const tool: Tool = { default_settings: { type: 'object', title: 'Default Settings', + additionalProperties: true, }, default_system_template: { type: 'string', @@ -59,6 +60,7 @@ export const tool: Tool = { metadata: { type: 'object', title: 'Metadata', + additionalProperties: true, }, model: { type: 'string', diff --git a/packages/mcp-server/src/tools/docs/get-docs.ts b/packages/mcp-server/src/tools/docs/get-docs.ts index 88246efe..714d5fa4 100644 --- a/packages/mcp-server/src/tools/docs/get-docs.ts +++ b/packages/mcp-server/src/tools/docs/get-docs.ts @@ -18,7 +18,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'get_docs', description: - "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nGet Doc\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/doc',\n $defs: {\n doc: {\n type: 'object',\n title: 'Doc',\n properties: {\n id: {\n type: 'string',\n title: 'Id'\n },\n content: {\n anyOf: [ {\n type: 'string'\n },\n {\n type: 'array',\n items: {\n type: 'string'\n }\n }\n ],\n title: 'Content'\n },\n created_at: {\n type: 'string',\n title: 'Created At',\n format: 'date-time'\n },\n title: {\n type: 'string',\n title: 'Title'\n },\n embedding_dimensions: {\n type: 'integer',\n title: 'Embedding Dimensions'\n },\n embedding_model: {\n type: 'string',\n title: 'Embedding Model'\n },\n embeddings: {\n anyOf: [ {\n type: 'array',\n items: {\n type: 'number'\n }\n },\n {\n type: 'array',\n items: {\n type: 'array',\n items: {\n type: 'number'\n }\n }\n }\n ],\n title: 'Embeddings'\n },\n language: {\n type: 'string',\n title: 'Language'\n },\n metadata: {\n type: 'object',\n title: 'Metadata'\n },\n modality: {\n type: 'string',\n title: 'Modality'\n }\n },\n required: [ 'id',\n 'content',\n 'created_at',\n 'title'\n ]\n }\n }\n}\n```", + "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nGet Doc\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/doc',\n $defs: {\n doc: {\n type: 'object',\n title: 'Doc',\n properties: {\n id: {\n type: 'string',\n title: 'Id'\n },\n content: {\n anyOf: [ {\n type: 'string'\n },\n {\n type: 'array',\n items: {\n type: 'string'\n }\n }\n ],\n title: 'Content'\n },\n created_at: {\n type: 'string',\n title: 'Created At',\n format: 'date-time'\n },\n title: {\n type: 'string',\n title: 'Title'\n },\n embedding_dimensions: {\n type: 'integer',\n title: 'Embedding Dimensions'\n },\n embedding_model: {\n type: 'string',\n title: 'Embedding Model'\n },\n embeddings: {\n anyOf: [ {\n type: 'array',\n items: {\n type: 'number'\n }\n },\n {\n type: 'array',\n items: {\n type: 'array',\n items: {\n type: 'number'\n }\n }\n }\n ],\n title: 'Embeddings'\n },\n language: {\n type: 'string',\n title: 'Language'\n },\n metadata: {\n type: 'object',\n title: 'Metadata',\n additionalProperties: true\n },\n modality: {\n type: 'string',\n title: 'Modality'\n }\n },\n required: [ 'id',\n 'content',\n 'created_at',\n 'title'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/executions/change-status-executions.ts b/packages/mcp-server/src/tools/executions/change-status-executions.ts index 16260dc1..12717909 100644 --- a/packages/mcp-server/src/tools/executions/change-status-executions.ts +++ b/packages/mcp-server/src/tools/executions/change-status-executions.ts @@ -30,6 +30,7 @@ export const tool: Tool = { input: { type: 'object', title: 'Input', + additionalProperties: true, }, status: { type: 'string', diff --git a/packages/mcp-server/src/tools/executions/create-executions.ts b/packages/mcp-server/src/tools/executions/create-executions.ts index 3225ee4a..bbae556c 100644 --- a/packages/mcp-server/src/tools/executions/create-executions.ts +++ b/packages/mcp-server/src/tools/executions/create-executions.ts @@ -18,7 +18,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'create_executions', description: - "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nCreate Task Execution\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/execution',\n $defs: {\n execution: {\n type: 'object',\n title: 'Execution',\n properties: {\n id: {\n type: 'string',\n title: 'Id'\n },\n created_at: {\n type: 'string',\n title: 'Created At',\n format: 'date-time'\n },\n input: {\n type: 'object',\n title: 'Input'\n },\n status: {\n type: 'string',\n title: 'Status',\n enum: [ 'queued',\n 'starting',\n 'running',\n 'awaiting_input',\n 'succeeded',\n 'failed',\n 'cancelled'\n ]\n },\n task_id: {\n type: 'string',\n title: 'Task Id'\n },\n updated_at: {\n type: 'string',\n title: 'Updated At',\n format: 'date-time'\n },\n error: {\n type: 'string',\n title: 'Error'\n },\n metadata: {\n type: 'object',\n title: 'Metadata'\n },\n output: {\n type: 'object',\n title: 'Output'\n },\n transition_count: {\n type: 'integer',\n title: 'Transition Count'\n }\n },\n required: [ 'id',\n 'created_at',\n 'input',\n 'status',\n 'task_id',\n 'updated_at'\n ]\n }\n }\n}\n```", + "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nCreate Task Execution\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/execution',\n $defs: {\n execution: {\n type: 'object',\n title: 'Execution',\n properties: {\n id: {\n type: 'string',\n title: 'Id'\n },\n created_at: {\n type: 'string',\n title: 'Created At',\n format: 'date-time'\n },\n input: {\n type: 'object',\n title: 'Input',\n additionalProperties: true\n },\n status: {\n type: 'string',\n title: 'Status',\n enum: [ 'queued',\n 'starting',\n 'running',\n 'awaiting_input',\n 'succeeded',\n 'failed',\n 'cancelled'\n ]\n },\n task_id: {\n type: 'string',\n title: 'Task Id'\n },\n updated_at: {\n type: 'string',\n title: 'Updated At',\n format: 'date-time'\n },\n error: {\n type: 'string',\n title: 'Error'\n },\n metadata: {\n type: 'object',\n title: 'Metadata',\n additionalProperties: true\n },\n output: {\n type: 'object',\n title: 'Output',\n additionalProperties: true\n },\n transition_count: {\n type: 'integer',\n title: 'Transition Count'\n }\n },\n required: [ 'id',\n 'created_at',\n 'input',\n 'status',\n 'task_id',\n 'updated_at'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { @@ -29,6 +29,7 @@ export const tool: Tool = { input: { type: 'object', title: 'Input', + additionalProperties: true, }, error: { type: 'string', @@ -37,10 +38,12 @@ export const tool: Tool = { metadata: { type: 'object', title: 'Metadata', + additionalProperties: true, }, output: { type: 'object', title: 'Output', + additionalProperties: true, }, transition_count: { type: 'integer', diff --git a/packages/mcp-server/src/tools/executions/get-executions.ts b/packages/mcp-server/src/tools/executions/get-executions.ts index 0c14adfb..e6204ea7 100644 --- a/packages/mcp-server/src/tools/executions/get-executions.ts +++ b/packages/mcp-server/src/tools/executions/get-executions.ts @@ -18,7 +18,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'get_executions', description: - "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nGet Execution Details\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/execution',\n $defs: {\n execution: {\n type: 'object',\n title: 'Execution',\n properties: {\n id: {\n type: 'string',\n title: 'Id'\n },\n created_at: {\n type: 'string',\n title: 'Created At',\n format: 'date-time'\n },\n input: {\n type: 'object',\n title: 'Input'\n },\n status: {\n type: 'string',\n title: 'Status',\n enum: [ 'queued',\n 'starting',\n 'running',\n 'awaiting_input',\n 'succeeded',\n 'failed',\n 'cancelled'\n ]\n },\n task_id: {\n type: 'string',\n title: 'Task Id'\n },\n updated_at: {\n type: 'string',\n title: 'Updated At',\n format: 'date-time'\n },\n error: {\n type: 'string',\n title: 'Error'\n },\n metadata: {\n type: 'object',\n title: 'Metadata'\n },\n output: {\n type: 'object',\n title: 'Output'\n },\n transition_count: {\n type: 'integer',\n title: 'Transition Count'\n }\n },\n required: [ 'id',\n 'created_at',\n 'input',\n 'status',\n 'task_id',\n 'updated_at'\n ]\n }\n }\n}\n```", + "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nGet Execution Details\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/execution',\n $defs: {\n execution: {\n type: 'object',\n title: 'Execution',\n properties: {\n id: {\n type: 'string',\n title: 'Id'\n },\n created_at: {\n type: 'string',\n title: 'Created At',\n format: 'date-time'\n },\n input: {\n type: 'object',\n title: 'Input',\n additionalProperties: true\n },\n status: {\n type: 'string',\n title: 'Status',\n enum: [ 'queued',\n 'starting',\n 'running',\n 'awaiting_input',\n 'succeeded',\n 'failed',\n 'cancelled'\n ]\n },\n task_id: {\n type: 'string',\n title: 'Task Id'\n },\n updated_at: {\n type: 'string',\n title: 'Updated At',\n format: 'date-time'\n },\n error: {\n type: 'string',\n title: 'Error'\n },\n metadata: {\n type: 'object',\n title: 'Metadata',\n additionalProperties: true\n },\n output: {\n type: 'object',\n title: 'Output',\n additionalProperties: true\n },\n transition_count: {\n type: 'integer',\n title: 'Transition Count'\n }\n },\n required: [ 'id',\n 'created_at',\n 'input',\n 'status',\n 'task_id',\n 'updated_at'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/executions/list-executions.ts b/packages/mcp-server/src/tools/executions/list-executions.ts index 4a3d069e..f516cb13 100644 --- a/packages/mcp-server/src/tools/executions/list-executions.ts +++ b/packages/mcp-server/src/tools/executions/list-executions.ts @@ -18,7 +18,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'list_executions', description: - "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nList Task Executions\n\n# Response Schema\n```json\n{\n type: 'object',\n title: 'ListResponse[Execution]',\n properties: {\n items: {\n type: 'array',\n title: 'Items',\n items: {\n $ref: '#/$defs/execution'\n }\n }\n },\n required: [ 'items'\n ],\n $defs: {\n execution: {\n type: 'object',\n title: 'Execution',\n properties: {\n id: {\n type: 'string',\n title: 'Id'\n },\n created_at: {\n type: 'string',\n title: 'Created At',\n format: 'date-time'\n },\n input: {\n type: 'object',\n title: 'Input'\n },\n status: {\n type: 'string',\n title: 'Status',\n enum: [ 'queued',\n 'starting',\n 'running',\n 'awaiting_input',\n 'succeeded',\n 'failed',\n 'cancelled'\n ]\n },\n task_id: {\n type: 'string',\n title: 'Task Id'\n },\n updated_at: {\n type: 'string',\n title: 'Updated At',\n format: 'date-time'\n },\n error: {\n type: 'string',\n title: 'Error'\n },\n metadata: {\n type: 'object',\n title: 'Metadata'\n },\n output: {\n type: 'object',\n title: 'Output'\n },\n transition_count: {\n type: 'integer',\n title: 'Transition Count'\n }\n },\n required: [ 'id',\n 'created_at',\n 'input',\n 'status',\n 'task_id',\n 'updated_at'\n ]\n }\n }\n}\n```", + "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nList Task Executions\n\n# Response Schema\n```json\n{\n type: 'object',\n title: 'ListResponse[Execution]',\n properties: {\n items: {\n type: 'array',\n title: 'Items',\n items: {\n $ref: '#/$defs/execution'\n }\n }\n },\n required: [ 'items'\n ],\n $defs: {\n execution: {\n type: 'object',\n title: 'Execution',\n properties: {\n id: {\n type: 'string',\n title: 'Id'\n },\n created_at: {\n type: 'string',\n title: 'Created At',\n format: 'date-time'\n },\n input: {\n type: 'object',\n title: 'Input',\n additionalProperties: true\n },\n status: {\n type: 'string',\n title: 'Status',\n enum: [ 'queued',\n 'starting',\n 'running',\n 'awaiting_input',\n 'succeeded',\n 'failed',\n 'cancelled'\n ]\n },\n task_id: {\n type: 'string',\n title: 'Task Id'\n },\n updated_at: {\n type: 'string',\n title: 'Updated At',\n format: 'date-time'\n },\n error: {\n type: 'string',\n title: 'Error'\n },\n metadata: {\n type: 'object',\n title: 'Metadata',\n additionalProperties: true\n },\n output: {\n type: 'object',\n title: 'Output',\n additionalProperties: true\n },\n transition_count: {\n type: 'integer',\n title: 'Transition Count'\n }\n },\n required: [ 'id',\n 'created_at',\n 'input',\n 'status',\n 'task_id',\n 'updated_at'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/executions/status/get-executions-status.ts b/packages/mcp-server/src/tools/executions/status/get-executions-status.ts index dc339174..2fe01ea6 100644 --- a/packages/mcp-server/src/tools/executions/status/get-executions-status.ts +++ b/packages/mcp-server/src/tools/executions/status/get-executions-status.ts @@ -18,7 +18,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'get_executions_status', description: - "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nGet Execution Details\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/execution',\n $defs: {\n execution: {\n type: 'object',\n title: 'Execution',\n properties: {\n id: {\n type: 'string',\n title: 'Id'\n },\n created_at: {\n type: 'string',\n title: 'Created At',\n format: 'date-time'\n },\n input: {\n type: 'object',\n title: 'Input'\n },\n status: {\n type: 'string',\n title: 'Status',\n enum: [ 'queued',\n 'starting',\n 'running',\n 'awaiting_input',\n 'succeeded',\n 'failed',\n 'cancelled'\n ]\n },\n task_id: {\n type: 'string',\n title: 'Task Id'\n },\n updated_at: {\n type: 'string',\n title: 'Updated At',\n format: 'date-time'\n },\n error: {\n type: 'string',\n title: 'Error'\n },\n metadata: {\n type: 'object',\n title: 'Metadata'\n },\n output: {\n type: 'object',\n title: 'Output'\n },\n transition_count: {\n type: 'integer',\n title: 'Transition Count'\n }\n },\n required: [ 'id',\n 'created_at',\n 'input',\n 'status',\n 'task_id',\n 'updated_at'\n ]\n }\n }\n}\n```", + "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nGet Execution Details\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/execution',\n $defs: {\n execution: {\n type: 'object',\n title: 'Execution',\n properties: {\n id: {\n type: 'string',\n title: 'Id'\n },\n created_at: {\n type: 'string',\n title: 'Created At',\n format: 'date-time'\n },\n input: {\n type: 'object',\n title: 'Input',\n additionalProperties: true\n },\n status: {\n type: 'string',\n title: 'Status',\n enum: [ 'queued',\n 'starting',\n 'running',\n 'awaiting_input',\n 'succeeded',\n 'failed',\n 'cancelled'\n ]\n },\n task_id: {\n type: 'string',\n title: 'Task Id'\n },\n updated_at: {\n type: 'string',\n title: 'Updated At',\n format: 'date-time'\n },\n error: {\n type: 'string',\n title: 'Error'\n },\n metadata: {\n type: 'object',\n title: 'Metadata',\n additionalProperties: true\n },\n output: {\n type: 'object',\n title: 'Output',\n additionalProperties: true\n },\n transition_count: {\n type: 'integer',\n title: 'Transition Count'\n }\n },\n required: [ 'id',\n 'created_at',\n 'input',\n 'status',\n 'task_id',\n 'updated_at'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/executions/transitions/list-executions-transitions.ts b/packages/mcp-server/src/tools/executions/transitions/list-executions-transitions.ts index e12d57a4..f07a08d0 100644 --- a/packages/mcp-server/src/tools/executions/transitions/list-executions-transitions.ts +++ b/packages/mcp-server/src/tools/executions/transitions/list-executions-transitions.ts @@ -18,7 +18,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'list_executions_transitions', description: - "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nList Execution Transitions\n\n# Response Schema\n```json\n{\n type: 'object',\n title: 'ListResponse[Transition]',\n properties: {\n items: {\n type: 'array',\n title: 'Items',\n items: {\n $ref: '#/$defs/transition'\n }\n }\n },\n required: [ 'items'\n ],\n $defs: {\n transition: {\n type: 'object',\n title: 'Transition',\n properties: {\n id: {\n type: 'string',\n title: 'Id'\n },\n created_at: {\n type: 'string',\n title: 'Created At',\n format: 'date-time'\n },\n current: {\n type: 'object',\n title: 'TransitionTarget',\n properties: {\n scope_id: {\n type: 'string',\n title: 'Scope Id'\n },\n step: {\n type: 'integer',\n title: 'Step'\n },\n workflow: {\n type: 'string',\n title: 'Workflow'\n }\n },\n required: [ 'scope_id',\n 'step',\n 'workflow'\n ]\n },\n execution_id: {\n type: 'string',\n title: 'Execution Id'\n },\n next: {\n type: 'object',\n title: 'TransitionTarget',\n properties: {\n scope_id: {\n type: 'string',\n title: 'Scope Id'\n },\n step: {\n type: 'integer',\n title: 'Step'\n },\n workflow: {\n type: 'string',\n title: 'Workflow'\n }\n },\n required: [ 'scope_id',\n 'step',\n 'workflow'\n ]\n },\n output: {\n type: 'object',\n title: 'Output'\n },\n type: {\n type: 'string',\n title: 'Type',\n enum: [ 'init',\n 'init_branch',\n 'finish',\n 'finish_branch',\n 'wait',\n 'resume',\n 'error',\n 'step',\n 'cancelled'\n ]\n },\n updated_at: {\n type: 'string',\n title: 'Updated At',\n format: 'date-time'\n },\n metadata: {\n type: 'object',\n title: 'Metadata'\n },\n step_label: {\n type: 'string',\n title: 'Step Label'\n }\n },\n required: [ 'id',\n 'created_at',\n 'current',\n 'execution_id',\n 'next',\n 'output',\n 'type',\n 'updated_at'\n ]\n }\n }\n}\n```", + "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nList Execution Transitions\n\n# Response Schema\n```json\n{\n type: 'object',\n title: 'ListResponse[Transition]',\n properties: {\n items: {\n type: 'array',\n title: 'Items',\n items: {\n $ref: '#/$defs/transition'\n }\n }\n },\n required: [ 'items'\n ],\n $defs: {\n transition: {\n type: 'object',\n title: 'Transition',\n properties: {\n id: {\n type: 'string',\n title: 'Id'\n },\n created_at: {\n type: 'string',\n title: 'Created At',\n format: 'date-time'\n },\n current: {\n type: 'object',\n title: 'TransitionTarget',\n properties: {\n scope_id: {\n type: 'string',\n title: 'Scope Id'\n },\n step: {\n type: 'integer',\n title: 'Step'\n },\n workflow: {\n type: 'string',\n title: 'Workflow'\n }\n },\n required: [ 'scope_id',\n 'step',\n 'workflow'\n ]\n },\n execution_id: {\n type: 'string',\n title: 'Execution Id'\n },\n next: {\n type: 'object',\n title: 'TransitionTarget',\n properties: {\n scope_id: {\n type: 'string',\n title: 'Scope Id'\n },\n step: {\n type: 'integer',\n title: 'Step'\n },\n workflow: {\n type: 'string',\n title: 'Workflow'\n }\n },\n required: [ 'scope_id',\n 'step',\n 'workflow'\n ]\n },\n output: {\n type: 'object',\n title: 'Output',\n additionalProperties: true\n },\n type: {\n type: 'string',\n title: 'Type',\n enum: [ 'init',\n 'init_branch',\n 'finish',\n 'finish_branch',\n 'wait',\n 'resume',\n 'error',\n 'step',\n 'cancelled'\n ]\n },\n updated_at: {\n type: 'string',\n title: 'Updated At',\n format: 'date-time'\n },\n metadata: {\n type: 'object',\n title: 'Metadata',\n additionalProperties: true\n },\n step_label: {\n type: 'string',\n title: 'Step Label'\n }\n },\n required: [ 'id',\n 'created_at',\n 'current',\n 'execution_id',\n 'next',\n 'output',\n 'type',\n 'updated_at'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/executions/transitions/retrieve-executions-transitions.ts b/packages/mcp-server/src/tools/executions/transitions/retrieve-executions-transitions.ts index 88f69f0e..3b328e0a 100644 --- a/packages/mcp-server/src/tools/executions/transitions/retrieve-executions-transitions.ts +++ b/packages/mcp-server/src/tools/executions/transitions/retrieve-executions-transitions.ts @@ -18,7 +18,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'retrieve_executions_transitions', description: - "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nGet Execution Transition\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/transition',\n $defs: {\n transition: {\n type: 'object',\n title: 'Transition',\n properties: {\n id: {\n type: 'string',\n title: 'Id'\n },\n created_at: {\n type: 'string',\n title: 'Created At',\n format: 'date-time'\n },\n current: {\n type: 'object',\n title: 'TransitionTarget',\n properties: {\n scope_id: {\n type: 'string',\n title: 'Scope Id'\n },\n step: {\n type: 'integer',\n title: 'Step'\n },\n workflow: {\n type: 'string',\n title: 'Workflow'\n }\n },\n required: [ 'scope_id',\n 'step',\n 'workflow'\n ]\n },\n execution_id: {\n type: 'string',\n title: 'Execution Id'\n },\n next: {\n type: 'object',\n title: 'TransitionTarget',\n properties: {\n scope_id: {\n type: 'string',\n title: 'Scope Id'\n },\n step: {\n type: 'integer',\n title: 'Step'\n },\n workflow: {\n type: 'string',\n title: 'Workflow'\n }\n },\n required: [ 'scope_id',\n 'step',\n 'workflow'\n ]\n },\n output: {\n type: 'object',\n title: 'Output'\n },\n type: {\n type: 'string',\n title: 'Type',\n enum: [ 'init',\n 'init_branch',\n 'finish',\n 'finish_branch',\n 'wait',\n 'resume',\n 'error',\n 'step',\n 'cancelled'\n ]\n },\n updated_at: {\n type: 'string',\n title: 'Updated At',\n format: 'date-time'\n },\n metadata: {\n type: 'object',\n title: 'Metadata'\n },\n step_label: {\n type: 'string',\n title: 'Step Label'\n }\n },\n required: [ 'id',\n 'created_at',\n 'current',\n 'execution_id',\n 'next',\n 'output',\n 'type',\n 'updated_at'\n ]\n }\n }\n}\n```", + "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nGet Execution Transition\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/transition',\n $defs: {\n transition: {\n type: 'object',\n title: 'Transition',\n properties: {\n id: {\n type: 'string',\n title: 'Id'\n },\n created_at: {\n type: 'string',\n title: 'Created At',\n format: 'date-time'\n },\n current: {\n type: 'object',\n title: 'TransitionTarget',\n properties: {\n scope_id: {\n type: 'string',\n title: 'Scope Id'\n },\n step: {\n type: 'integer',\n title: 'Step'\n },\n workflow: {\n type: 'string',\n title: 'Workflow'\n }\n },\n required: [ 'scope_id',\n 'step',\n 'workflow'\n ]\n },\n execution_id: {\n type: 'string',\n title: 'Execution Id'\n },\n next: {\n type: 'object',\n title: 'TransitionTarget',\n properties: {\n scope_id: {\n type: 'string',\n title: 'Scope Id'\n },\n step: {\n type: 'integer',\n title: 'Step'\n },\n workflow: {\n type: 'string',\n title: 'Workflow'\n }\n },\n required: [ 'scope_id',\n 'step',\n 'workflow'\n ]\n },\n output: {\n type: 'object',\n title: 'Output',\n additionalProperties: true\n },\n type: {\n type: 'string',\n title: 'Type',\n enum: [ 'init',\n 'init_branch',\n 'finish',\n 'finish_branch',\n 'wait',\n 'resume',\n 'error',\n 'step',\n 'cancelled'\n ]\n },\n updated_at: {\n type: 'string',\n title: 'Updated At',\n format: 'date-time'\n },\n metadata: {\n type: 'object',\n title: 'Metadata',\n additionalProperties: true\n },\n step_label: {\n type: 'string',\n title: 'Step Label'\n }\n },\n required: [ 'id',\n 'created_at',\n 'current',\n 'execution_id',\n 'next',\n 'output',\n 'type',\n 'updated_at'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/projects/create-projects.ts b/packages/mcp-server/src/tools/projects/create-projects.ts index 548380a7..98dd28f5 100644 --- a/packages/mcp-server/src/tools/projects/create-projects.ts +++ b/packages/mcp-server/src/tools/projects/create-projects.ts @@ -18,7 +18,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'create_projects', description: - "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nCreate Project\n\n# Response Schema\n```json\n{\n type: 'object',\n title: 'Project',\n description: 'Project model',\n properties: {\n id: {\n type: 'string',\n title: 'Id'\n },\n created_at: {\n type: 'string',\n title: 'Created At',\n format: 'date-time'\n },\n name: {\n type: 'string',\n title: 'Name'\n },\n updated_at: {\n type: 'string',\n title: 'Updated At',\n format: 'date-time'\n },\n canonical_name: {\n type: 'string',\n title: 'Canonical Name'\n },\n metadata: {\n type: 'object',\n title: 'Metadata'\n }\n },\n required: [ 'id',\n 'created_at',\n 'name',\n 'updated_at'\n ]\n}\n```", + "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nCreate Project\n\n# Response Schema\n```json\n{\n type: 'object',\n title: 'Project',\n description: 'Project model',\n properties: {\n id: {\n type: 'string',\n title: 'Id'\n },\n created_at: {\n type: 'string',\n title: 'Created At',\n format: 'date-time'\n },\n name: {\n type: 'string',\n title: 'Name'\n },\n updated_at: {\n type: 'string',\n title: 'Updated At',\n format: 'date-time'\n },\n canonical_name: {\n type: 'string',\n title: 'Canonical Name'\n },\n metadata: {\n type: 'object',\n title: 'Metadata',\n additionalProperties: true\n }\n },\n required: [ 'id',\n 'created_at',\n 'name',\n 'updated_at'\n ]\n}\n```", inputSchema: { type: 'object', properties: { @@ -33,6 +33,7 @@ export const tool: Tool = { metadata: { type: 'object', title: 'Metadata', + additionalProperties: true, }, jq_filter: { type: 'string', diff --git a/packages/mcp-server/src/tools/projects/list-projects.ts b/packages/mcp-server/src/tools/projects/list-projects.ts index 84dc044d..38132e09 100644 --- a/packages/mcp-server/src/tools/projects/list-projects.ts +++ b/packages/mcp-server/src/tools/projects/list-projects.ts @@ -18,7 +18,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'list_projects', description: - "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nList Projects\n\n# Response Schema\n```json\n{\n type: 'object',\n title: 'ListResponse[Project]',\n properties: {\n items: {\n type: 'array',\n title: 'Items',\n items: {\n type: 'object',\n title: 'Project',\n description: 'Project model',\n properties: {\n id: {\n type: 'string',\n title: 'Id'\n },\n created_at: {\n type: 'string',\n title: 'Created At',\n format: 'date-time'\n },\n name: {\n type: 'string',\n title: 'Name'\n },\n updated_at: {\n type: 'string',\n title: 'Updated At',\n format: 'date-time'\n },\n canonical_name: {\n type: 'string',\n title: 'Canonical Name'\n },\n metadata: {\n type: 'object',\n title: 'Metadata'\n }\n },\n required: [ 'id',\n 'created_at',\n 'name',\n 'updated_at'\n ]\n }\n }\n },\n required: [ 'items'\n ]\n}\n```", + "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nList Projects\n\n# Response Schema\n```json\n{\n type: 'object',\n title: 'ListResponse[Project]',\n properties: {\n items: {\n type: 'array',\n title: 'Items',\n items: {\n type: 'object',\n title: 'Project',\n description: 'Project model',\n properties: {\n id: {\n type: 'string',\n title: 'Id'\n },\n created_at: {\n type: 'string',\n title: 'Created At',\n format: 'date-time'\n },\n name: {\n type: 'string',\n title: 'Name'\n },\n updated_at: {\n type: 'string',\n title: 'Updated At',\n format: 'date-time'\n },\n canonical_name: {\n type: 'string',\n title: 'Canonical Name'\n },\n metadata: {\n type: 'object',\n title: 'Metadata',\n additionalProperties: true\n }\n },\n required: [ 'id',\n 'created_at',\n 'name',\n 'updated_at'\n ]\n }\n }\n },\n required: [ 'items'\n ]\n}\n```", inputSchema: { type: 'object', properties: { @@ -34,6 +34,7 @@ export const tool: Tool = { metadata_filter: { type: 'object', title: 'MetadataFilter', + additionalProperties: true, }, offset: { type: 'integer', diff --git a/packages/mcp-server/src/tools/secrets/create-secrets.ts b/packages/mcp-server/src/tools/secrets/create-secrets.ts index 8dbbf092..4e53d7e1 100644 --- a/packages/mcp-server/src/tools/secrets/create-secrets.ts +++ b/packages/mcp-server/src/tools/secrets/create-secrets.ts @@ -18,7 +18,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'create_secrets', description: - "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nCreate a new secret for a developer.\n\nArgs:\n developer_id: ID of the developer creating the secret\n secret: Secret to create\n\nReturns:\n The created secret\n\nRaises:\n HTTPException: If a secret with this name already exists (409 Conflict)\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/secret',\n $defs: {\n secret: {\n type: 'object',\n title: 'Secret',\n description: 'A secret that can be used in tasks and sessions',\n properties: {\n id: {\n type: 'string',\n title: 'Id'\n },\n created_at: {\n type: 'string',\n title: 'Created At',\n format: 'date-time'\n },\n name: {\n type: 'string',\n title: 'Name'\n },\n updated_at: {\n type: 'string',\n title: 'Updated At',\n format: 'date-time'\n },\n value: {\n type: 'string',\n title: 'Value'\n },\n description: {\n type: 'string',\n title: 'Description'\n },\n metadata: {\n type: 'object',\n title: 'Metadata'\n }\n },\n required: [ 'id',\n 'created_at',\n 'name',\n 'updated_at',\n 'value'\n ]\n }\n }\n}\n```", + "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nCreate a new secret for a developer.\n\nArgs:\n developer_id: ID of the developer creating the secret\n secret: Secret to create\n\nReturns:\n The created secret\n\nRaises:\n HTTPException: If a secret with this name already exists (409 Conflict)\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/secret',\n $defs: {\n secret: {\n type: 'object',\n title: 'Secret',\n description: 'A secret that can be used in tasks and sessions',\n properties: {\n id: {\n type: 'string',\n title: 'Id'\n },\n created_at: {\n type: 'string',\n title: 'Created At',\n format: 'date-time'\n },\n name: {\n type: 'string',\n title: 'Name'\n },\n updated_at: {\n type: 'string',\n title: 'Updated At',\n format: 'date-time'\n },\n value: {\n type: 'string',\n title: 'Value'\n },\n description: {\n type: 'string',\n title: 'Description'\n },\n metadata: {\n type: 'object',\n title: 'Metadata',\n additionalProperties: true\n }\n },\n required: [ 'id',\n 'created_at',\n 'name',\n 'updated_at',\n 'value'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { @@ -37,6 +37,7 @@ export const tool: Tool = { metadata: { type: 'object', title: 'Metadata', + additionalProperties: true, }, jq_filter: { type: 'string', diff --git a/packages/mcp-server/src/tools/secrets/list-secrets.ts b/packages/mcp-server/src/tools/secrets/list-secrets.ts index 5005bcd5..3e5eb6ef 100644 --- a/packages/mcp-server/src/tools/secrets/list-secrets.ts +++ b/packages/mcp-server/src/tools/secrets/list-secrets.ts @@ -18,7 +18,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'list_secrets', description: - "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nList all secrets for a developer.\n\nArgs:\n x_developer_id: ID of the developer whose secrets to list\n limit: Maximum number of secrets to return\n offset: Number of secrets to skip\n\nReturns:\n List of secrets\n\n# Response Schema\n```json\n{\n type: 'array',\n title: 'Response List Developer Secrets Secrets Get',\n items: {\n $ref: '#/$defs/secret'\n },\n $defs: {\n secret: {\n type: 'object',\n title: 'Secret',\n description: 'A secret that can be used in tasks and sessions',\n properties: {\n id: {\n type: 'string',\n title: 'Id'\n },\n created_at: {\n type: 'string',\n title: 'Created At',\n format: 'date-time'\n },\n name: {\n type: 'string',\n title: 'Name'\n },\n updated_at: {\n type: 'string',\n title: 'Updated At',\n format: 'date-time'\n },\n value: {\n type: 'string',\n title: 'Value'\n },\n description: {\n type: 'string',\n title: 'Description'\n },\n metadata: {\n type: 'object',\n title: 'Metadata'\n }\n },\n required: [ 'id',\n 'created_at',\n 'name',\n 'updated_at',\n 'value'\n ]\n }\n }\n}\n```", + "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nList all secrets for a developer.\n\nArgs:\n x_developer_id: ID of the developer whose secrets to list\n limit: Maximum number of secrets to return\n offset: Number of secrets to skip\n\nReturns:\n List of secrets\n\n# Response Schema\n```json\n{\n type: 'array',\n title: 'Response List Developer Secrets Secrets Get',\n items: {\n $ref: '#/$defs/secret'\n },\n $defs: {\n secret: {\n type: 'object',\n title: 'Secret',\n description: 'A secret that can be used in tasks and sessions',\n properties: {\n id: {\n type: 'string',\n title: 'Id'\n },\n created_at: {\n type: 'string',\n title: 'Created At',\n format: 'date-time'\n },\n name: {\n type: 'string',\n title: 'Name'\n },\n updated_at: {\n type: 'string',\n title: 'Updated At',\n format: 'date-time'\n },\n value: {\n type: 'string',\n title: 'Value'\n },\n description: {\n type: 'string',\n title: 'Description'\n },\n metadata: {\n type: 'object',\n title: 'Metadata',\n additionalProperties: true\n }\n },\n required: [ 'id',\n 'created_at',\n 'name',\n 'updated_at',\n 'value'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/secrets/update-secrets.ts b/packages/mcp-server/src/tools/secrets/update-secrets.ts index c6fca0a8..15804501 100644 --- a/packages/mcp-server/src/tools/secrets/update-secrets.ts +++ b/packages/mcp-server/src/tools/secrets/update-secrets.ts @@ -18,7 +18,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'update_secrets', description: - "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nUpdate a developer secret.\n\nArgs:\n developer_id: ID of the developer who owns the secret\n secret_id: ID of the secret to update\n data: New secret data\n\nReturns:\n The updated secret\n\nRaises:\n HTTPException: If the secret doesn't exist or doesn't belong to the developer\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/secret',\n $defs: {\n secret: {\n type: 'object',\n title: 'Secret',\n description: 'A secret that can be used in tasks and sessions',\n properties: {\n id: {\n type: 'string',\n title: 'Id'\n },\n created_at: {\n type: 'string',\n title: 'Created At',\n format: 'date-time'\n },\n name: {\n type: 'string',\n title: 'Name'\n },\n updated_at: {\n type: 'string',\n title: 'Updated At',\n format: 'date-time'\n },\n value: {\n type: 'string',\n title: 'Value'\n },\n description: {\n type: 'string',\n title: 'Description'\n },\n metadata: {\n type: 'object',\n title: 'Metadata'\n }\n },\n required: [ 'id',\n 'created_at',\n 'name',\n 'updated_at',\n 'value'\n ]\n }\n }\n}\n```", + "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nUpdate a developer secret.\n\nArgs:\n developer_id: ID of the developer who owns the secret\n secret_id: ID of the secret to update\n data: New secret data\n\nReturns:\n The updated secret\n\nRaises:\n HTTPException: If the secret doesn't exist or doesn't belong to the developer\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/secret',\n $defs: {\n secret: {\n type: 'object',\n title: 'Secret',\n description: 'A secret that can be used in tasks and sessions',\n properties: {\n id: {\n type: 'string',\n title: 'Id'\n },\n created_at: {\n type: 'string',\n title: 'Created At',\n format: 'date-time'\n },\n name: {\n type: 'string',\n title: 'Name'\n },\n updated_at: {\n type: 'string',\n title: 'Updated At',\n format: 'date-time'\n },\n value: {\n type: 'string',\n title: 'Value'\n },\n description: {\n type: 'string',\n title: 'Description'\n },\n metadata: {\n type: 'object',\n title: 'Metadata',\n additionalProperties: true\n }\n },\n required: [ 'id',\n 'created_at',\n 'name',\n 'updated_at',\n 'value'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { @@ -41,6 +41,7 @@ export const tool: Tool = { metadata: { type: 'object', title: 'Metadata', + additionalProperties: true, }, jq_filter: { type: 'string', diff --git a/packages/mcp-server/src/tools/sessions/chat-sessions.ts b/packages/mcp-server/src/tools/sessions/chat-sessions.ts index 2fdbd6c1..23cf6d76 100644 --- a/packages/mcp-server/src/tools/sessions/chat-sessions.ts +++ b/packages/mcp-server/src/tools/sessions/chat-sessions.ts @@ -215,6 +215,7 @@ export const tool: Tool = { connection_pool: { type: 'object', title: 'Connection Pool', + additionalProperties: true, }, agent: { type: 'string', @@ -235,6 +236,7 @@ export const tool: Tool = { logit_bias: { type: 'object', title: 'Logit Bias', + additionalProperties: true, }, max_tokens: { type: 'integer', @@ -243,6 +245,7 @@ export const tool: Tool = { metadata: { type: 'object', title: 'Metadata', + additionalProperties: true, }, min_p: { type: 'number', @@ -360,14 +363,17 @@ export const tool: Tool = { cookies: { type: 'object', title: 'Cookies', + additionalProperties: true, }, data: { type: 'object', title: 'Data', + additionalProperties: true, }, files: { type: 'object', title: 'Files', + additionalProperties: true, }, follow_redirects: { type: 'boolean', @@ -376,6 +382,7 @@ export const tool: Tool = { headers: { type: 'object', title: 'Headers', + additionalProperties: true, }, include_response_content: { type: 'boolean', @@ -384,6 +391,7 @@ export const tool: Tool = { json: { type: 'object', title: 'Json', + additionalProperties: true, }, params: { anyOf: [ @@ -392,6 +400,7 @@ export const tool: Tool = { }, { type: 'object', + additionalProperties: true, }, ], title: 'Params', @@ -404,6 +413,7 @@ export const tool: Tool = { properties: { type: 'object', title: 'Properties', + additionalProperties: true, }, additionalProperties: { type: 'boolean', @@ -426,10 +436,12 @@ export const tool: Tool = { schema: { type: 'object', title: 'Schema', + additionalProperties: true, }, secrets: { type: 'object', title: 'Secrets', + additionalProperties: true, }, timeout: { type: 'integer', @@ -558,6 +570,7 @@ export const tool: Tool = { api_call: { type: 'object', title: 'Api Call', + additionalProperties: true, }, bash_20241022: { $ref: '#/$defs/chosen_bash20241022', @@ -568,10 +581,12 @@ export const tool: Tool = { integration: { type: 'object', title: 'Integration', + additionalProperties: true, }, system: { type: 'object', title: 'System', + additionalProperties: true, }, text_editor_20241022: { $ref: '#/$defs/chosen_text_editor20241022', @@ -703,6 +718,7 @@ export const tool: Tool = { json_schema: { type: 'object', title: 'Json Schema', + additionalProperties: true, }, type: { type: 'string', @@ -772,14 +788,17 @@ export const tool: Tool = { description: { type: 'object', title: 'Description', + additionalProperties: true, }, name: { type: 'object', title: 'Name', + additionalProperties: true, }, parameters: { type: 'object', title: 'Parameters', + additionalProperties: true, }, }, }, @@ -790,6 +809,7 @@ export const tool: Tool = { arguments: { type: 'object', title: 'Arguments', + additionalProperties: true, }, method: { type: 'string', @@ -803,6 +823,7 @@ export const tool: Tool = { setup: { type: 'object', title: 'Setup', + additionalProperties: true, }, }, }, @@ -962,6 +983,7 @@ export const tool: Tool = { params: { type: 'object', title: 'Params', + additionalProperties: true, }, }, required: ['url'], @@ -998,6 +1020,7 @@ export const tool: Tool = { setup: { type: 'object', title: 'Setup', + additionalProperties: true, }, }, }, @@ -1290,6 +1313,7 @@ export const tool: Tool = { browserSettings: { type: 'object', title: 'Browsersettings', + additionalProperties: true, }, extensionId: { type: 'string', @@ -1312,6 +1336,7 @@ export const tool: Tool = { type: 'array', items: { type: 'object', + additionalProperties: true, }, }, ], @@ -1505,6 +1530,7 @@ export const tool: Tool = { title: 'Coordinate', items: { type: 'object', + additionalProperties: true, }, }, text: { @@ -1566,6 +1592,7 @@ export const tool: Tool = { params: { type: 'object', title: 'Params', + additionalProperties: true, }, }, required: ['file'], @@ -1582,6 +1609,7 @@ export const tool: Tool = { params: { type: 'object', title: 'Params', + additionalProperties: true, }, }, required: ['llamaparse_api_key'], @@ -1606,6 +1634,7 @@ export const tool: Tool = { setup: { type: 'object', title: 'Setup', + additionalProperties: true, }, }, }, @@ -1678,6 +1707,7 @@ export const tool: Tool = { upload_params: { type: 'object', title: 'Upload Params', + additionalProperties: true, }, }, required: ['file'], @@ -1702,6 +1732,7 @@ export const tool: Tool = { params: { type: 'object', title: 'Params', + additionalProperties: true, }, }, required: ['cloudinary_api_key', 'cloudinary_api_secret', 'cloudinary_cloud_name'], @@ -1743,6 +1774,7 @@ export const tool: Tool = { title: 'Transformation', items: { type: 'object', + additionalProperties: true, }, }, return_base64: { @@ -1772,6 +1804,7 @@ export const tool: Tool = { setup: { type: 'object', title: 'Setup', + additionalProperties: true, }, }, }, @@ -1850,6 +1883,7 @@ export const tool: Tool = { partition_params: { type: 'object', title: 'Partition Params', + additionalProperties: true, }, }, required: ['file'], @@ -1866,6 +1900,7 @@ export const tool: Tool = { retry_config: { type: 'object', title: 'Retry Config', + additionalProperties: true, }, server: { type: 'string', @@ -1882,6 +1917,7 @@ export const tool: Tool = { url_params: { type: 'object', title: 'Url Params', + additionalProperties: true, }, }, required: ['unstructured_api_key'], @@ -1982,6 +2018,7 @@ export const tool: Tool = { arguments: { type: 'object', title: 'Arguments', + additionalProperties: true, }, resource_id: { type: 'string', diff --git a/packages/mcp-server/src/tools/sessions/create-or-update-sessions.ts b/packages/mcp-server/src/tools/sessions/create-or-update-sessions.ts index a537942c..943ffdb8 100644 --- a/packages/mcp-server/src/tools/sessions/create-or-update-sessions.ts +++ b/packages/mcp-server/src/tools/sessions/create-or-update-sessions.ts @@ -51,6 +51,7 @@ export const tool: Tool = { metadata: { type: 'object', title: 'Metadata', + additionalProperties: true, }, recall_options: { anyOf: [ @@ -123,6 +124,7 @@ export const tool: Tool = { metadata_filter: { type: 'object', title: 'Metadata Filter', + additionalProperties: true, }, mmr_strength: { type: 'number', @@ -162,6 +164,7 @@ export const tool: Tool = { metadata_filter: { type: 'object', title: 'Metadata Filter', + additionalProperties: true, }, mode: { type: 'string', @@ -213,6 +216,7 @@ export const tool: Tool = { metadata_filter: { type: 'object', title: 'Metadata Filter', + additionalProperties: true, }, mmr_strength: { type: 'number', diff --git a/packages/mcp-server/src/tools/sessions/create-sessions.ts b/packages/mcp-server/src/tools/sessions/create-sessions.ts index 82fefb97..6e67de2e 100644 --- a/packages/mcp-server/src/tools/sessions/create-sessions.ts +++ b/packages/mcp-server/src/tools/sessions/create-sessions.ts @@ -1,6 +1,5 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { maybeFilter } from '@julep/sdk-mcp/filtering'; import { Metadata, asTextContentResult } from '@julep/sdk-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; @@ -17,8 +16,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'create_sessions', - description: - "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nCreate Session\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/session',\n $defs: {\n session: {\n type: 'object',\n title: 'Session',\n properties: {\n id: {\n type: 'string',\n title: 'Id'\n },\n created_at: {\n type: 'string',\n title: 'Created At',\n format: 'date-time'\n },\n updated_at: {\n type: 'string',\n title: 'Updated At',\n format: 'date-time'\n },\n auto_run_tools: {\n type: 'boolean',\n title: 'Auto Run Tools'\n },\n context_overflow: {\n type: 'string',\n title: 'Context Overflow',\n enum: [ 'truncate',\n 'adaptive'\n ]\n },\n forward_tool_calls: {\n type: 'boolean',\n title: 'Forward Tool Calls'\n },\n kind: {\n type: 'string',\n title: 'Kind'\n },\n metadata: {\n type: 'object',\n title: 'Metadata'\n },\n recall_options: {\n anyOf: [ {\n $ref: '#/$defs/vector_doc_search'\n },\n {\n $ref: '#/$defs/text_only_doc_search'\n },\n {\n $ref: '#/$defs/hybrid_doc_search'\n }\n ],\n title: 'Recall Options'\n },\n render_templates: {\n type: 'boolean',\n title: 'Render Templates'\n },\n situation: {\n type: 'string',\n title: 'Situation'\n },\n summary: {\n type: 'string',\n title: 'Summary'\n },\n system_template: {\n type: 'string',\n title: 'System Template'\n },\n token_budget: {\n type: 'integer',\n title: 'Token Budget'\n }\n },\n required: [ 'id',\n 'created_at',\n 'updated_at'\n ]\n },\n vector_doc_search: {\n type: 'object',\n title: 'VectorDocSearch',\n properties: {\n confidence: {\n type: 'number',\n title: 'Confidence'\n },\n include_embeddings: {\n type: 'boolean',\n title: 'Include Embeddings'\n },\n lang: {\n type: 'string',\n title: 'Lang'\n },\n limit: {\n type: 'integer',\n title: 'Limit'\n },\n max_query_length: {\n type: 'integer',\n title: 'Max Query Length'\n },\n metadata_filter: {\n type: 'object',\n title: 'Metadata Filter'\n },\n mmr_strength: {\n type: 'number',\n title: 'Mmr Strength'\n },\n mode: {\n type: 'string',\n title: 'Mode',\n enum: [ 'vector'\n ]\n },\n num_search_messages: {\n type: 'integer',\n title: 'Num Search Messages'\n }\n }\n },\n text_only_doc_search: {\n type: 'object',\n title: 'TextOnlyDocSearch',\n properties: {\n include_embeddings: {\n type: 'boolean',\n title: 'Include Embeddings'\n },\n lang: {\n type: 'string',\n title: 'Lang'\n },\n limit: {\n type: 'integer',\n title: 'Limit'\n },\n max_query_length: {\n type: 'integer',\n title: 'Max Query Length'\n },\n metadata_filter: {\n type: 'object',\n title: 'Metadata Filter'\n },\n mode: {\n type: 'string',\n title: 'Mode',\n enum: [ 'text'\n ]\n },\n num_search_messages: {\n type: 'integer',\n title: 'Num Search Messages'\n },\n trigram_similarity_threshold: {\n type: 'number',\n title: 'Trigram Similarity Threshold'\n }\n }\n },\n hybrid_doc_search: {\n type: 'object',\n title: 'HybridDocSearch',\n properties: {\n alpha: {\n type: 'number',\n title: 'Alpha'\n },\n confidence: {\n type: 'number',\n title: 'Confidence'\n },\n include_embeddings: {\n type: 'boolean',\n title: 'Include Embeddings'\n },\n k_multiplier: {\n type: 'integer',\n title: 'K Multiplier'\n },\n lang: {\n type: 'string',\n title: 'Lang'\n },\n limit: {\n type: 'integer',\n title: 'Limit'\n },\n max_query_length: {\n type: 'integer',\n title: 'Max Query Length'\n },\n metadata_filter: {\n type: 'object',\n title: 'Metadata Filter'\n },\n mmr_strength: {\n type: 'number',\n title: 'Mmr Strength'\n },\n mode: {\n type: 'string',\n title: 'Mode',\n enum: [ 'hybrid'\n ]\n },\n num_search_messages: {\n type: 'integer',\n title: 'Num Search Messages'\n },\n trigram_similarity_threshold: {\n type: 'number',\n title: 'Trigram Similarity Threshold'\n }\n }\n }\n }\n}\n```", + description: 'Create Session', inputSchema: { type: 'object', properties: { @@ -49,6 +47,7 @@ export const tool: Tool = { metadata: { type: 'object', title: 'Metadata', + additionalProperties: true, }, recall_options: { anyOf: [ @@ -91,12 +90,6 @@ export const tool: Tool = { type: 'string', }, }, - jq_filter: { - type: 'string', - title: 'jq Filter', - description: - 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', - }, }, required: [], $defs: { @@ -127,6 +120,7 @@ export const tool: Tool = { metadata_filter: { type: 'object', title: 'Metadata Filter', + additionalProperties: true, }, mmr_strength: { type: 'number', @@ -166,6 +160,7 @@ export const tool: Tool = { metadata_filter: { type: 'object', title: 'Metadata Filter', + additionalProperties: true, }, mode: { type: 'string', @@ -217,6 +212,7 @@ export const tool: Tool = { metadata_filter: { type: 'object', title: 'Metadata Filter', + additionalProperties: true, }, mmr_strength: { type: 'number', @@ -243,8 +239,8 @@ export const tool: Tool = { }; export const handler = async (client: Julep, args: Record | undefined) => { - const { jq_filter, ...body } = args as any; - return asTextContentResult(await maybeFilter(jq_filter, await client.sessions.create(body))); + const body = args as any; + return asTextContentResult(await client.sessions.create(body)); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/sessions/get-sessions.ts b/packages/mcp-server/src/tools/sessions/get-sessions.ts index 6bc43d43..ea46940c 100644 --- a/packages/mcp-server/src/tools/sessions/get-sessions.ts +++ b/packages/mcp-server/src/tools/sessions/get-sessions.ts @@ -18,7 +18,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'get_sessions', description: - "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nGet Session\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/session',\n $defs: {\n session: {\n type: 'object',\n title: 'Session',\n properties: {\n id: {\n type: 'string',\n title: 'Id'\n },\n created_at: {\n type: 'string',\n title: 'Created At',\n format: 'date-time'\n },\n updated_at: {\n type: 'string',\n title: 'Updated At',\n format: 'date-time'\n },\n auto_run_tools: {\n type: 'boolean',\n title: 'Auto Run Tools'\n },\n context_overflow: {\n type: 'string',\n title: 'Context Overflow',\n enum: [ 'truncate',\n 'adaptive'\n ]\n },\n forward_tool_calls: {\n type: 'boolean',\n title: 'Forward Tool Calls'\n },\n kind: {\n type: 'string',\n title: 'Kind'\n },\n metadata: {\n type: 'object',\n title: 'Metadata'\n },\n recall_options: {\n anyOf: [ {\n $ref: '#/$defs/vector_doc_search'\n },\n {\n $ref: '#/$defs/text_only_doc_search'\n },\n {\n $ref: '#/$defs/hybrid_doc_search'\n }\n ],\n title: 'Recall Options'\n },\n render_templates: {\n type: 'boolean',\n title: 'Render Templates'\n },\n situation: {\n type: 'string',\n title: 'Situation'\n },\n summary: {\n type: 'string',\n title: 'Summary'\n },\n system_template: {\n type: 'string',\n title: 'System Template'\n },\n token_budget: {\n type: 'integer',\n title: 'Token Budget'\n }\n },\n required: [ 'id',\n 'created_at',\n 'updated_at'\n ]\n },\n vector_doc_search: {\n type: 'object',\n title: 'VectorDocSearch',\n properties: {\n confidence: {\n type: 'number',\n title: 'Confidence'\n },\n include_embeddings: {\n type: 'boolean',\n title: 'Include Embeddings'\n },\n lang: {\n type: 'string',\n title: 'Lang'\n },\n limit: {\n type: 'integer',\n title: 'Limit'\n },\n max_query_length: {\n type: 'integer',\n title: 'Max Query Length'\n },\n metadata_filter: {\n type: 'object',\n title: 'Metadata Filter'\n },\n mmr_strength: {\n type: 'number',\n title: 'Mmr Strength'\n },\n mode: {\n type: 'string',\n title: 'Mode',\n enum: [ 'vector'\n ]\n },\n num_search_messages: {\n type: 'integer',\n title: 'Num Search Messages'\n }\n }\n },\n text_only_doc_search: {\n type: 'object',\n title: 'TextOnlyDocSearch',\n properties: {\n include_embeddings: {\n type: 'boolean',\n title: 'Include Embeddings'\n },\n lang: {\n type: 'string',\n title: 'Lang'\n },\n limit: {\n type: 'integer',\n title: 'Limit'\n },\n max_query_length: {\n type: 'integer',\n title: 'Max Query Length'\n },\n metadata_filter: {\n type: 'object',\n title: 'Metadata Filter'\n },\n mode: {\n type: 'string',\n title: 'Mode',\n enum: [ 'text'\n ]\n },\n num_search_messages: {\n type: 'integer',\n title: 'Num Search Messages'\n },\n trigram_similarity_threshold: {\n type: 'number',\n title: 'Trigram Similarity Threshold'\n }\n }\n },\n hybrid_doc_search: {\n type: 'object',\n title: 'HybridDocSearch',\n properties: {\n alpha: {\n type: 'number',\n title: 'Alpha'\n },\n confidence: {\n type: 'number',\n title: 'Confidence'\n },\n include_embeddings: {\n type: 'boolean',\n title: 'Include Embeddings'\n },\n k_multiplier: {\n type: 'integer',\n title: 'K Multiplier'\n },\n lang: {\n type: 'string',\n title: 'Lang'\n },\n limit: {\n type: 'integer',\n title: 'Limit'\n },\n max_query_length: {\n type: 'integer',\n title: 'Max Query Length'\n },\n metadata_filter: {\n type: 'object',\n title: 'Metadata Filter'\n },\n mmr_strength: {\n type: 'number',\n title: 'Mmr Strength'\n },\n mode: {\n type: 'string',\n title: 'Mode',\n enum: [ 'hybrid'\n ]\n },\n num_search_messages: {\n type: 'integer',\n title: 'Num Search Messages'\n },\n trigram_similarity_threshold: {\n type: 'number',\n title: 'Trigram Similarity Threshold'\n }\n }\n }\n }\n}\n```", + "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nGet Session\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/session',\n $defs: {\n session: {\n type: 'object',\n title: 'Session',\n properties: {\n id: {\n type: 'string',\n title: 'Id'\n },\n created_at: {\n type: 'string',\n title: 'Created At',\n format: 'date-time'\n },\n updated_at: {\n type: 'string',\n title: 'Updated At',\n format: 'date-time'\n },\n auto_run_tools: {\n type: 'boolean',\n title: 'Auto Run Tools'\n },\n context_overflow: {\n type: 'string',\n title: 'Context Overflow',\n enum: [ 'truncate',\n 'adaptive'\n ]\n },\n forward_tool_calls: {\n type: 'boolean',\n title: 'Forward Tool Calls'\n },\n kind: {\n type: 'string',\n title: 'Kind'\n },\n metadata: {\n type: 'object',\n title: 'Metadata',\n additionalProperties: true\n },\n recall_options: {\n anyOf: [ {\n $ref: '#/$defs/vector_doc_search'\n },\n {\n $ref: '#/$defs/text_only_doc_search'\n },\n {\n $ref: '#/$defs/hybrid_doc_search'\n }\n ],\n title: 'Recall Options'\n },\n render_templates: {\n type: 'boolean',\n title: 'Render Templates'\n },\n situation: {\n type: 'string',\n title: 'Situation'\n },\n summary: {\n type: 'string',\n title: 'Summary'\n },\n system_template: {\n type: 'string',\n title: 'System Template'\n },\n token_budget: {\n type: 'integer',\n title: 'Token Budget'\n }\n },\n required: [ 'id',\n 'created_at',\n 'updated_at'\n ]\n },\n vector_doc_search: {\n type: 'object',\n title: 'VectorDocSearch',\n properties: {\n confidence: {\n type: 'number',\n title: 'Confidence'\n },\n include_embeddings: {\n type: 'boolean',\n title: 'Include Embeddings'\n },\n lang: {\n type: 'string',\n title: 'Lang'\n },\n limit: {\n type: 'integer',\n title: 'Limit'\n },\n max_query_length: {\n type: 'integer',\n title: 'Max Query Length'\n },\n metadata_filter: {\n type: 'object',\n title: 'Metadata Filter',\n additionalProperties: true\n },\n mmr_strength: {\n type: 'number',\n title: 'Mmr Strength'\n },\n mode: {\n type: 'string',\n title: 'Mode',\n enum: [ 'vector'\n ]\n },\n num_search_messages: {\n type: 'integer',\n title: 'Num Search Messages'\n }\n }\n },\n text_only_doc_search: {\n type: 'object',\n title: 'TextOnlyDocSearch',\n properties: {\n include_embeddings: {\n type: 'boolean',\n title: 'Include Embeddings'\n },\n lang: {\n type: 'string',\n title: 'Lang'\n },\n limit: {\n type: 'integer',\n title: 'Limit'\n },\n max_query_length: {\n type: 'integer',\n title: 'Max Query Length'\n },\n metadata_filter: {\n type: 'object',\n title: 'Metadata Filter',\n additionalProperties: true\n },\n mode: {\n type: 'string',\n title: 'Mode',\n enum: [ 'text'\n ]\n },\n num_search_messages: {\n type: 'integer',\n title: 'Num Search Messages'\n },\n trigram_similarity_threshold: {\n type: 'number',\n title: 'Trigram Similarity Threshold'\n }\n }\n },\n hybrid_doc_search: {\n type: 'object',\n title: 'HybridDocSearch',\n properties: {\n alpha: {\n type: 'number',\n title: 'Alpha'\n },\n confidence: {\n type: 'number',\n title: 'Confidence'\n },\n include_embeddings: {\n type: 'boolean',\n title: 'Include Embeddings'\n },\n k_multiplier: {\n type: 'integer',\n title: 'K Multiplier'\n },\n lang: {\n type: 'string',\n title: 'Lang'\n },\n limit: {\n type: 'integer',\n title: 'Limit'\n },\n max_query_length: {\n type: 'integer',\n title: 'Max Query Length'\n },\n metadata_filter: {\n type: 'object',\n title: 'Metadata Filter',\n additionalProperties: true\n },\n mmr_strength: {\n type: 'number',\n title: 'Mmr Strength'\n },\n mode: {\n type: 'string',\n title: 'Mode',\n enum: [ 'hybrid'\n ]\n },\n num_search_messages: {\n type: 'integer',\n title: 'Num Search Messages'\n },\n trigram_similarity_threshold: {\n type: 'number',\n title: 'Trigram Similarity Threshold'\n }\n }\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/sessions/list-sessions.ts b/packages/mcp-server/src/tools/sessions/list-sessions.ts index 880bef0d..fd9b7712 100644 --- a/packages/mcp-server/src/tools/sessions/list-sessions.ts +++ b/packages/mcp-server/src/tools/sessions/list-sessions.ts @@ -18,7 +18,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'list_sessions', description: - "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nList Sessions\n\n# Response Schema\n```json\n{\n type: 'object',\n title: 'ListResponse[Session]',\n properties: {\n items: {\n type: 'array',\n title: 'Items',\n items: {\n $ref: '#/$defs/session'\n }\n }\n },\n required: [ 'items'\n ],\n $defs: {\n session: {\n type: 'object',\n title: 'Session',\n properties: {\n id: {\n type: 'string',\n title: 'Id'\n },\n created_at: {\n type: 'string',\n title: 'Created At',\n format: 'date-time'\n },\n updated_at: {\n type: 'string',\n title: 'Updated At',\n format: 'date-time'\n },\n auto_run_tools: {\n type: 'boolean',\n title: 'Auto Run Tools'\n },\n context_overflow: {\n type: 'string',\n title: 'Context Overflow',\n enum: [ 'truncate',\n 'adaptive'\n ]\n },\n forward_tool_calls: {\n type: 'boolean',\n title: 'Forward Tool Calls'\n },\n kind: {\n type: 'string',\n title: 'Kind'\n },\n metadata: {\n type: 'object',\n title: 'Metadata'\n },\n recall_options: {\n anyOf: [ {\n $ref: '#/$defs/vector_doc_search'\n },\n {\n $ref: '#/$defs/text_only_doc_search'\n },\n {\n $ref: '#/$defs/hybrid_doc_search'\n }\n ],\n title: 'Recall Options'\n },\n render_templates: {\n type: 'boolean',\n title: 'Render Templates'\n },\n situation: {\n type: 'string',\n title: 'Situation'\n },\n summary: {\n type: 'string',\n title: 'Summary'\n },\n system_template: {\n type: 'string',\n title: 'System Template'\n },\n token_budget: {\n type: 'integer',\n title: 'Token Budget'\n }\n },\n required: [ 'id',\n 'created_at',\n 'updated_at'\n ]\n },\n vector_doc_search: {\n type: 'object',\n title: 'VectorDocSearch',\n properties: {\n confidence: {\n type: 'number',\n title: 'Confidence'\n },\n include_embeddings: {\n type: 'boolean',\n title: 'Include Embeddings'\n },\n lang: {\n type: 'string',\n title: 'Lang'\n },\n limit: {\n type: 'integer',\n title: 'Limit'\n },\n max_query_length: {\n type: 'integer',\n title: 'Max Query Length'\n },\n metadata_filter: {\n type: 'object',\n title: 'Metadata Filter'\n },\n mmr_strength: {\n type: 'number',\n title: 'Mmr Strength'\n },\n mode: {\n type: 'string',\n title: 'Mode',\n enum: [ 'vector'\n ]\n },\n num_search_messages: {\n type: 'integer',\n title: 'Num Search Messages'\n }\n }\n },\n text_only_doc_search: {\n type: 'object',\n title: 'TextOnlyDocSearch',\n properties: {\n include_embeddings: {\n type: 'boolean',\n title: 'Include Embeddings'\n },\n lang: {\n type: 'string',\n title: 'Lang'\n },\n limit: {\n type: 'integer',\n title: 'Limit'\n },\n max_query_length: {\n type: 'integer',\n title: 'Max Query Length'\n },\n metadata_filter: {\n type: 'object',\n title: 'Metadata Filter'\n },\n mode: {\n type: 'string',\n title: 'Mode',\n enum: [ 'text'\n ]\n },\n num_search_messages: {\n type: 'integer',\n title: 'Num Search Messages'\n },\n trigram_similarity_threshold: {\n type: 'number',\n title: 'Trigram Similarity Threshold'\n }\n }\n },\n hybrid_doc_search: {\n type: 'object',\n title: 'HybridDocSearch',\n properties: {\n alpha: {\n type: 'number',\n title: 'Alpha'\n },\n confidence: {\n type: 'number',\n title: 'Confidence'\n },\n include_embeddings: {\n type: 'boolean',\n title: 'Include Embeddings'\n },\n k_multiplier: {\n type: 'integer',\n title: 'K Multiplier'\n },\n lang: {\n type: 'string',\n title: 'Lang'\n },\n limit: {\n type: 'integer',\n title: 'Limit'\n },\n max_query_length: {\n type: 'integer',\n title: 'Max Query Length'\n },\n metadata_filter: {\n type: 'object',\n title: 'Metadata Filter'\n },\n mmr_strength: {\n type: 'number',\n title: 'Mmr Strength'\n },\n mode: {\n type: 'string',\n title: 'Mode',\n enum: [ 'hybrid'\n ]\n },\n num_search_messages: {\n type: 'integer',\n title: 'Num Search Messages'\n },\n trigram_similarity_threshold: {\n type: 'number',\n title: 'Trigram Similarity Threshold'\n }\n }\n }\n }\n}\n```", + "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nList Sessions\n\n# Response Schema\n```json\n{\n type: 'object',\n title: 'ListResponse[Session]',\n properties: {\n items: {\n type: 'array',\n title: 'Items',\n items: {\n $ref: '#/$defs/session'\n }\n }\n },\n required: [ 'items'\n ],\n $defs: {\n session: {\n type: 'object',\n title: 'Session',\n properties: {\n id: {\n type: 'string',\n title: 'Id'\n },\n created_at: {\n type: 'string',\n title: 'Created At',\n format: 'date-time'\n },\n updated_at: {\n type: 'string',\n title: 'Updated At',\n format: 'date-time'\n },\n auto_run_tools: {\n type: 'boolean',\n title: 'Auto Run Tools'\n },\n context_overflow: {\n type: 'string',\n title: 'Context Overflow',\n enum: [ 'truncate',\n 'adaptive'\n ]\n },\n forward_tool_calls: {\n type: 'boolean',\n title: 'Forward Tool Calls'\n },\n kind: {\n type: 'string',\n title: 'Kind'\n },\n metadata: {\n type: 'object',\n title: 'Metadata',\n additionalProperties: true\n },\n recall_options: {\n anyOf: [ {\n $ref: '#/$defs/vector_doc_search'\n },\n {\n $ref: '#/$defs/text_only_doc_search'\n },\n {\n $ref: '#/$defs/hybrid_doc_search'\n }\n ],\n title: 'Recall Options'\n },\n render_templates: {\n type: 'boolean',\n title: 'Render Templates'\n },\n situation: {\n type: 'string',\n title: 'Situation'\n },\n summary: {\n type: 'string',\n title: 'Summary'\n },\n system_template: {\n type: 'string',\n title: 'System Template'\n },\n token_budget: {\n type: 'integer',\n title: 'Token Budget'\n }\n },\n required: [ 'id',\n 'created_at',\n 'updated_at'\n ]\n },\n vector_doc_search: {\n type: 'object',\n title: 'VectorDocSearch',\n properties: {\n confidence: {\n type: 'number',\n title: 'Confidence'\n },\n include_embeddings: {\n type: 'boolean',\n title: 'Include Embeddings'\n },\n lang: {\n type: 'string',\n title: 'Lang'\n },\n limit: {\n type: 'integer',\n title: 'Limit'\n },\n max_query_length: {\n type: 'integer',\n title: 'Max Query Length'\n },\n metadata_filter: {\n type: 'object',\n title: 'Metadata Filter',\n additionalProperties: true\n },\n mmr_strength: {\n type: 'number',\n title: 'Mmr Strength'\n },\n mode: {\n type: 'string',\n title: 'Mode',\n enum: [ 'vector'\n ]\n },\n num_search_messages: {\n type: 'integer',\n title: 'Num Search Messages'\n }\n }\n },\n text_only_doc_search: {\n type: 'object',\n title: 'TextOnlyDocSearch',\n properties: {\n include_embeddings: {\n type: 'boolean',\n title: 'Include Embeddings'\n },\n lang: {\n type: 'string',\n title: 'Lang'\n },\n limit: {\n type: 'integer',\n title: 'Limit'\n },\n max_query_length: {\n type: 'integer',\n title: 'Max Query Length'\n },\n metadata_filter: {\n type: 'object',\n title: 'Metadata Filter',\n additionalProperties: true\n },\n mode: {\n type: 'string',\n title: 'Mode',\n enum: [ 'text'\n ]\n },\n num_search_messages: {\n type: 'integer',\n title: 'Num Search Messages'\n },\n trigram_similarity_threshold: {\n type: 'number',\n title: 'Trigram Similarity Threshold'\n }\n }\n },\n hybrid_doc_search: {\n type: 'object',\n title: 'HybridDocSearch',\n properties: {\n alpha: {\n type: 'number',\n title: 'Alpha'\n },\n confidence: {\n type: 'number',\n title: 'Confidence'\n },\n include_embeddings: {\n type: 'boolean',\n title: 'Include Embeddings'\n },\n k_multiplier: {\n type: 'integer',\n title: 'K Multiplier'\n },\n lang: {\n type: 'string',\n title: 'Lang'\n },\n limit: {\n type: 'integer',\n title: 'Limit'\n },\n max_query_length: {\n type: 'integer',\n title: 'Max Query Length'\n },\n metadata_filter: {\n type: 'object',\n title: 'Metadata Filter',\n additionalProperties: true\n },\n mmr_strength: {\n type: 'number',\n title: 'Mmr Strength'\n },\n mode: {\n type: 'string',\n title: 'Mode',\n enum: [ 'hybrid'\n ]\n },\n num_search_messages: {\n type: 'integer',\n title: 'Num Search Messages'\n },\n trigram_similarity_threshold: {\n type: 'number',\n title: 'Trigram Similarity Threshold'\n }\n }\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { @@ -34,6 +34,7 @@ export const tool: Tool = { metadata_filter: { type: 'object', title: 'MetadataFilter', + additionalProperties: true, }, offset: { type: 'integer', diff --git a/packages/mcp-server/src/tools/sessions/render-sessions.ts b/packages/mcp-server/src/tools/sessions/render-sessions.ts index ae144f4d..f8680ca6 100644 --- a/packages/mcp-server/src/tools/sessions/render-sessions.ts +++ b/packages/mcp-server/src/tools/sessions/render-sessions.ts @@ -231,6 +231,7 @@ export const tool: Tool = { logit_bias: { type: 'object', title: 'Logit Bias', + additionalProperties: true, }, max_tokens: { type: 'integer', @@ -239,6 +240,7 @@ export const tool: Tool = { metadata: { type: 'object', title: 'Metadata', + additionalProperties: true, }, min_p: { type: 'number', @@ -356,14 +358,17 @@ export const tool: Tool = { cookies: { type: 'object', title: 'Cookies', + additionalProperties: true, }, data: { type: 'object', title: 'Data', + additionalProperties: true, }, files: { type: 'object', title: 'Files', + additionalProperties: true, }, follow_redirects: { type: 'boolean', @@ -372,6 +377,7 @@ export const tool: Tool = { headers: { type: 'object', title: 'Headers', + additionalProperties: true, }, include_response_content: { type: 'boolean', @@ -380,6 +386,7 @@ export const tool: Tool = { json: { type: 'object', title: 'Json', + additionalProperties: true, }, params: { anyOf: [ @@ -388,6 +395,7 @@ export const tool: Tool = { }, { type: 'object', + additionalProperties: true, }, ], title: 'Params', @@ -400,6 +408,7 @@ export const tool: Tool = { properties: { type: 'object', title: 'Properties', + additionalProperties: true, }, additionalProperties: { type: 'boolean', @@ -422,10 +431,12 @@ export const tool: Tool = { schema: { type: 'object', title: 'Schema', + additionalProperties: true, }, secrets: { type: 'object', title: 'Secrets', + additionalProperties: true, }, timeout: { type: 'integer', @@ -550,6 +561,7 @@ export const tool: Tool = { api_call: { type: 'object', title: 'Api Call', + additionalProperties: true, }, bash_20241022: { $ref: '#/$defs/chosen_bash20241022', @@ -560,10 +572,12 @@ export const tool: Tool = { integration: { type: 'object', title: 'Integration', + additionalProperties: true, }, system: { type: 'object', title: 'System', + additionalProperties: true, }, text_editor_20241022: { $ref: '#/$defs/chosen_text_editor20241022', @@ -695,6 +709,7 @@ export const tool: Tool = { json_schema: { type: 'object', title: 'Json Schema', + additionalProperties: true, }, type: { type: 'string', @@ -764,14 +779,17 @@ export const tool: Tool = { description: { type: 'object', title: 'Description', + additionalProperties: true, }, name: { type: 'object', title: 'Name', + additionalProperties: true, }, parameters: { type: 'object', title: 'Parameters', + additionalProperties: true, }, }, }, @@ -782,6 +800,7 @@ export const tool: Tool = { arguments: { type: 'object', title: 'Arguments', + additionalProperties: true, }, method: { type: 'string', @@ -795,6 +814,7 @@ export const tool: Tool = { setup: { type: 'object', title: 'Setup', + additionalProperties: true, }, }, }, @@ -954,6 +974,7 @@ export const tool: Tool = { params: { type: 'object', title: 'Params', + additionalProperties: true, }, }, required: ['url'], @@ -990,6 +1011,7 @@ export const tool: Tool = { setup: { type: 'object', title: 'Setup', + additionalProperties: true, }, }, }, @@ -1282,6 +1304,7 @@ export const tool: Tool = { browserSettings: { type: 'object', title: 'Browsersettings', + additionalProperties: true, }, extensionId: { type: 'string', @@ -1304,6 +1327,7 @@ export const tool: Tool = { type: 'array', items: { type: 'object', + additionalProperties: true, }, }, ], @@ -1497,6 +1521,7 @@ export const tool: Tool = { title: 'Coordinate', items: { type: 'object', + additionalProperties: true, }, }, text: { @@ -1558,6 +1583,7 @@ export const tool: Tool = { params: { type: 'object', title: 'Params', + additionalProperties: true, }, }, required: ['file'], @@ -1574,6 +1600,7 @@ export const tool: Tool = { params: { type: 'object', title: 'Params', + additionalProperties: true, }, }, required: ['llamaparse_api_key'], @@ -1598,6 +1625,7 @@ export const tool: Tool = { setup: { type: 'object', title: 'Setup', + additionalProperties: true, }, }, }, @@ -1670,6 +1698,7 @@ export const tool: Tool = { upload_params: { type: 'object', title: 'Upload Params', + additionalProperties: true, }, }, required: ['file'], @@ -1694,6 +1723,7 @@ export const tool: Tool = { params: { type: 'object', title: 'Params', + additionalProperties: true, }, }, required: ['cloudinary_api_key', 'cloudinary_api_secret', 'cloudinary_cloud_name'], @@ -1735,6 +1765,7 @@ export const tool: Tool = { title: 'Transformation', items: { type: 'object', + additionalProperties: true, }, }, return_base64: { @@ -1764,6 +1795,7 @@ export const tool: Tool = { setup: { type: 'object', title: 'Setup', + additionalProperties: true, }, }, }, @@ -1842,6 +1874,7 @@ export const tool: Tool = { partition_params: { type: 'object', title: 'Partition Params', + additionalProperties: true, }, }, required: ['file'], @@ -1858,6 +1891,7 @@ export const tool: Tool = { retry_config: { type: 'object', title: 'Retry Config', + additionalProperties: true, }, server: { type: 'string', @@ -1874,6 +1908,7 @@ export const tool: Tool = { url_params: { type: 'object', title: 'Url Params', + additionalProperties: true, }, }, required: ['unstructured_api_key'], @@ -1974,6 +2009,7 @@ export const tool: Tool = { arguments: { type: 'object', title: 'Arguments', + additionalProperties: true, }, resource_id: { type: 'string', diff --git a/packages/mcp-server/src/tools/sessions/reset-sessions.ts b/packages/mcp-server/src/tools/sessions/reset-sessions.ts index 2f8395e6..25252156 100644 --- a/packages/mcp-server/src/tools/sessions/reset-sessions.ts +++ b/packages/mcp-server/src/tools/sessions/reset-sessions.ts @@ -18,7 +18,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'reset_sessions', description: - "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nUpdate Session\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/session',\n $defs: {\n session: {\n type: 'object',\n title: 'Session',\n properties: {\n id: {\n type: 'string',\n title: 'Id'\n },\n created_at: {\n type: 'string',\n title: 'Created At',\n format: 'date-time'\n },\n updated_at: {\n type: 'string',\n title: 'Updated At',\n format: 'date-time'\n },\n auto_run_tools: {\n type: 'boolean',\n title: 'Auto Run Tools'\n },\n context_overflow: {\n type: 'string',\n title: 'Context Overflow',\n enum: [ 'truncate',\n 'adaptive'\n ]\n },\n forward_tool_calls: {\n type: 'boolean',\n title: 'Forward Tool Calls'\n },\n kind: {\n type: 'string',\n title: 'Kind'\n },\n metadata: {\n type: 'object',\n title: 'Metadata'\n },\n recall_options: {\n anyOf: [ {\n $ref: '#/$defs/vector_doc_search'\n },\n {\n $ref: '#/$defs/text_only_doc_search'\n },\n {\n $ref: '#/$defs/hybrid_doc_search'\n }\n ],\n title: 'Recall Options'\n },\n render_templates: {\n type: 'boolean',\n title: 'Render Templates'\n },\n situation: {\n type: 'string',\n title: 'Situation'\n },\n summary: {\n type: 'string',\n title: 'Summary'\n },\n system_template: {\n type: 'string',\n title: 'System Template'\n },\n token_budget: {\n type: 'integer',\n title: 'Token Budget'\n }\n },\n required: [ 'id',\n 'created_at',\n 'updated_at'\n ]\n },\n vector_doc_search: {\n type: 'object',\n title: 'VectorDocSearch',\n properties: {\n confidence: {\n type: 'number',\n title: 'Confidence'\n },\n include_embeddings: {\n type: 'boolean',\n title: 'Include Embeddings'\n },\n lang: {\n type: 'string',\n title: 'Lang'\n },\n limit: {\n type: 'integer',\n title: 'Limit'\n },\n max_query_length: {\n type: 'integer',\n title: 'Max Query Length'\n },\n metadata_filter: {\n type: 'object',\n title: 'Metadata Filter'\n },\n mmr_strength: {\n type: 'number',\n title: 'Mmr Strength'\n },\n mode: {\n type: 'string',\n title: 'Mode',\n enum: [ 'vector'\n ]\n },\n num_search_messages: {\n type: 'integer',\n title: 'Num Search Messages'\n }\n }\n },\n text_only_doc_search: {\n type: 'object',\n title: 'TextOnlyDocSearch',\n properties: {\n include_embeddings: {\n type: 'boolean',\n title: 'Include Embeddings'\n },\n lang: {\n type: 'string',\n title: 'Lang'\n },\n limit: {\n type: 'integer',\n title: 'Limit'\n },\n max_query_length: {\n type: 'integer',\n title: 'Max Query Length'\n },\n metadata_filter: {\n type: 'object',\n title: 'Metadata Filter'\n },\n mode: {\n type: 'string',\n title: 'Mode',\n enum: [ 'text'\n ]\n },\n num_search_messages: {\n type: 'integer',\n title: 'Num Search Messages'\n },\n trigram_similarity_threshold: {\n type: 'number',\n title: 'Trigram Similarity Threshold'\n }\n }\n },\n hybrid_doc_search: {\n type: 'object',\n title: 'HybridDocSearch',\n properties: {\n alpha: {\n type: 'number',\n title: 'Alpha'\n },\n confidence: {\n type: 'number',\n title: 'Confidence'\n },\n include_embeddings: {\n type: 'boolean',\n title: 'Include Embeddings'\n },\n k_multiplier: {\n type: 'integer',\n title: 'K Multiplier'\n },\n lang: {\n type: 'string',\n title: 'Lang'\n },\n limit: {\n type: 'integer',\n title: 'Limit'\n },\n max_query_length: {\n type: 'integer',\n title: 'Max Query Length'\n },\n metadata_filter: {\n type: 'object',\n title: 'Metadata Filter'\n },\n mmr_strength: {\n type: 'number',\n title: 'Mmr Strength'\n },\n mode: {\n type: 'string',\n title: 'Mode',\n enum: [ 'hybrid'\n ]\n },\n num_search_messages: {\n type: 'integer',\n title: 'Num Search Messages'\n },\n trigram_similarity_threshold: {\n type: 'number',\n title: 'Trigram Similarity Threshold'\n }\n }\n }\n }\n}\n```", + "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nUpdate Session\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/session',\n $defs: {\n session: {\n type: 'object',\n title: 'Session',\n properties: {\n id: {\n type: 'string',\n title: 'Id'\n },\n created_at: {\n type: 'string',\n title: 'Created At',\n format: 'date-time'\n },\n updated_at: {\n type: 'string',\n title: 'Updated At',\n format: 'date-time'\n },\n auto_run_tools: {\n type: 'boolean',\n title: 'Auto Run Tools'\n },\n context_overflow: {\n type: 'string',\n title: 'Context Overflow',\n enum: [ 'truncate',\n 'adaptive'\n ]\n },\n forward_tool_calls: {\n type: 'boolean',\n title: 'Forward Tool Calls'\n },\n kind: {\n type: 'string',\n title: 'Kind'\n },\n metadata: {\n type: 'object',\n title: 'Metadata',\n additionalProperties: true\n },\n recall_options: {\n anyOf: [ {\n $ref: '#/$defs/vector_doc_search'\n },\n {\n $ref: '#/$defs/text_only_doc_search'\n },\n {\n $ref: '#/$defs/hybrid_doc_search'\n }\n ],\n title: 'Recall Options'\n },\n render_templates: {\n type: 'boolean',\n title: 'Render Templates'\n },\n situation: {\n type: 'string',\n title: 'Situation'\n },\n summary: {\n type: 'string',\n title: 'Summary'\n },\n system_template: {\n type: 'string',\n title: 'System Template'\n },\n token_budget: {\n type: 'integer',\n title: 'Token Budget'\n }\n },\n required: [ 'id',\n 'created_at',\n 'updated_at'\n ]\n },\n vector_doc_search: {\n type: 'object',\n title: 'VectorDocSearch',\n properties: {\n confidence: {\n type: 'number',\n title: 'Confidence'\n },\n include_embeddings: {\n type: 'boolean',\n title: 'Include Embeddings'\n },\n lang: {\n type: 'string',\n title: 'Lang'\n },\n limit: {\n type: 'integer',\n title: 'Limit'\n },\n max_query_length: {\n type: 'integer',\n title: 'Max Query Length'\n },\n metadata_filter: {\n type: 'object',\n title: 'Metadata Filter',\n additionalProperties: true\n },\n mmr_strength: {\n type: 'number',\n title: 'Mmr Strength'\n },\n mode: {\n type: 'string',\n title: 'Mode',\n enum: [ 'vector'\n ]\n },\n num_search_messages: {\n type: 'integer',\n title: 'Num Search Messages'\n }\n }\n },\n text_only_doc_search: {\n type: 'object',\n title: 'TextOnlyDocSearch',\n properties: {\n include_embeddings: {\n type: 'boolean',\n title: 'Include Embeddings'\n },\n lang: {\n type: 'string',\n title: 'Lang'\n },\n limit: {\n type: 'integer',\n title: 'Limit'\n },\n max_query_length: {\n type: 'integer',\n title: 'Max Query Length'\n },\n metadata_filter: {\n type: 'object',\n title: 'Metadata Filter',\n additionalProperties: true\n },\n mode: {\n type: 'string',\n title: 'Mode',\n enum: [ 'text'\n ]\n },\n num_search_messages: {\n type: 'integer',\n title: 'Num Search Messages'\n },\n trigram_similarity_threshold: {\n type: 'number',\n title: 'Trigram Similarity Threshold'\n }\n }\n },\n hybrid_doc_search: {\n type: 'object',\n title: 'HybridDocSearch',\n properties: {\n alpha: {\n type: 'number',\n title: 'Alpha'\n },\n confidence: {\n type: 'number',\n title: 'Confidence'\n },\n include_embeddings: {\n type: 'boolean',\n title: 'Include Embeddings'\n },\n k_multiplier: {\n type: 'integer',\n title: 'K Multiplier'\n },\n lang: {\n type: 'string',\n title: 'Lang'\n },\n limit: {\n type: 'integer',\n title: 'Limit'\n },\n max_query_length: {\n type: 'integer',\n title: 'Max Query Length'\n },\n metadata_filter: {\n type: 'object',\n title: 'Metadata Filter',\n additionalProperties: true\n },\n mmr_strength: {\n type: 'number',\n title: 'Mmr Strength'\n },\n mode: {\n type: 'string',\n title: 'Mode',\n enum: [ 'hybrid'\n ]\n },\n num_search_messages: {\n type: 'integer',\n title: 'Num Search Messages'\n },\n trigram_similarity_threshold: {\n type: 'number',\n title: 'Trigram Similarity Threshold'\n }\n }\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { @@ -42,6 +42,7 @@ export const tool: Tool = { metadata: { type: 'object', title: 'Metadata', + additionalProperties: true, }, recall_options: { anyOf: [ @@ -109,6 +110,7 @@ export const tool: Tool = { metadata_filter: { type: 'object', title: 'Metadata Filter', + additionalProperties: true, }, mmr_strength: { type: 'number', @@ -148,6 +150,7 @@ export const tool: Tool = { metadata_filter: { type: 'object', title: 'Metadata Filter', + additionalProperties: true, }, mode: { type: 'string', @@ -199,6 +202,7 @@ export const tool: Tool = { metadata_filter: { type: 'object', title: 'Metadata Filter', + additionalProperties: true, }, mmr_strength: { type: 'number', diff --git a/packages/mcp-server/src/tools/sessions/update-sessions.ts b/packages/mcp-server/src/tools/sessions/update-sessions.ts index af4ad91d..895d9140 100644 --- a/packages/mcp-server/src/tools/sessions/update-sessions.ts +++ b/packages/mcp-server/src/tools/sessions/update-sessions.ts @@ -40,6 +40,7 @@ export const tool: Tool = { metadata: { type: 'object', title: 'Metadata', + additionalProperties: true, }, recall_options: { anyOf: [ @@ -70,6 +71,7 @@ export const tool: Tool = { metadata_filter: { type: 'object', title: 'Metadata Filter', + additionalProperties: true, }, mmr_strength: { type: 'number', @@ -109,6 +111,7 @@ export const tool: Tool = { metadata_filter: { type: 'object', title: 'Metadata Filter', + additionalProperties: true, }, mode: { type: 'string', @@ -160,6 +163,7 @@ export const tool: Tool = { metadata_filter: { type: 'object', title: 'Metadata Filter', + additionalProperties: true, }, mmr_strength: { type: 'number', diff --git a/packages/mcp-server/src/tools/tasks/create-or-update-tasks.ts b/packages/mcp-server/src/tools/tasks/create-or-update-tasks.ts index 4e841de1..0b6a80fe 100644 --- a/packages/mcp-server/src/tools/tasks/create-or-update-tasks.ts +++ b/packages/mcp-server/src/tools/tasks/create-or-update-tasks.ts @@ -277,6 +277,7 @@ export const tool: Tool = { initial: { type: 'object', title: 'Initial', + additionalProperties: true, }, kind_: { type: 'string', @@ -320,10 +321,12 @@ export const tool: Tool = { input_schema: { type: 'object', title: 'Input Schema', + additionalProperties: true, }, metadata: { type: 'object', title: 'Metadata', + additionalProperties: true, }, tools: { type: 'array', @@ -370,14 +373,17 @@ export const tool: Tool = { cookies: { type: 'object', title: 'Cookies', + additionalProperties: true, }, data: { type: 'object', title: 'Data', + additionalProperties: true, }, files: { type: 'object', title: 'Files', + additionalProperties: true, }, follow_redirects: { type: 'boolean', @@ -386,6 +392,7 @@ export const tool: Tool = { headers: { type: 'object', title: 'Headers', + additionalProperties: true, }, include_response_content: { type: 'boolean', @@ -394,6 +401,7 @@ export const tool: Tool = { json: { type: 'object', title: 'Json', + additionalProperties: true, }, params: { anyOf: [ @@ -402,6 +410,7 @@ export const tool: Tool = { }, { type: 'object', + additionalProperties: true, }, ], title: 'Params', @@ -414,6 +423,7 @@ export const tool: Tool = { properties: { type: 'object', title: 'Properties', + additionalProperties: true, }, additionalProperties: { type: 'boolean', @@ -436,10 +446,12 @@ export const tool: Tool = { schema: { type: 'object', title: 'Schema', + additionalProperties: true, }, secrets: { type: 'object', title: 'Secrets', + additionalProperties: true, }, timeout: { type: 'integer', @@ -557,6 +569,7 @@ export const tool: Tool = { evaluate: { type: 'object', title: 'Evaluate', + additionalProperties: true, }, kind_: { type: 'string', @@ -582,6 +595,7 @@ export const tool: Tool = { anyOf: [ { type: 'object', + additionalProperties: true, }, { type: 'string', @@ -820,6 +834,7 @@ export const tool: Tool = { settings: { type: 'object', title: 'Settings', + additionalProperties: true, }, tool_choice: { anyOf: [ @@ -932,14 +947,17 @@ export const tool: Tool = { cookies: { type: 'object', title: 'Cookies', + additionalProperties: true, }, data: { type: 'object', title: 'Data', + additionalProperties: true, }, files: { type: 'object', title: 'Files', + additionalProperties: true, }, follow_redirects: { type: 'boolean', @@ -948,6 +966,7 @@ export const tool: Tool = { headers: { type: 'object', title: 'Headers', + additionalProperties: true, }, include_response_content: { type: 'boolean', @@ -956,6 +975,7 @@ export const tool: Tool = { json: { type: 'object', title: 'Json', + additionalProperties: true, }, params: { anyOf: [ @@ -964,6 +984,7 @@ export const tool: Tool = { }, { type: 'object', + additionalProperties: true, }, ], title: 'Params', @@ -976,6 +997,7 @@ export const tool: Tool = { properties: { type: 'object', title: 'Properties', + additionalProperties: true, }, additionalProperties: { type: 'boolean', @@ -998,10 +1020,12 @@ export const tool: Tool = { schema: { type: 'object', title: 'Schema', + additionalProperties: true, }, secrets: { type: 'object', title: 'Secrets', + additionalProperties: true, }, timeout: { type: 'integer', @@ -1132,6 +1156,7 @@ export const tool: Tool = { api_call: { type: 'object', title: 'Api Call', + additionalProperties: true, }, bash_20241022: { $ref: '#/$defs/chosen_bash20241022', @@ -1142,10 +1167,12 @@ export const tool: Tool = { integration: { type: 'object', title: 'Integration', + additionalProperties: true, }, system: { type: 'object', title: 'System', + additionalProperties: true, }, text_editor_20241022: { $ref: '#/$defs/chosen_text_editor20241022', @@ -1319,14 +1346,17 @@ export const tool: Tool = { description: { type: 'object', title: 'Description', + additionalProperties: true, }, name: { type: 'object', title: 'Name', + additionalProperties: true, }, parameters: { type: 'object', title: 'Parameters', + additionalProperties: true, }, }, }, @@ -1337,6 +1367,7 @@ export const tool: Tool = { arguments: { type: 'object', title: 'Arguments', + additionalProperties: true, }, method: { type: 'string', @@ -1350,6 +1381,7 @@ export const tool: Tool = { setup: { type: 'object', title: 'Setup', + additionalProperties: true, }, }, }, @@ -1509,6 +1541,7 @@ export const tool: Tool = { params: { type: 'object', title: 'Params', + additionalProperties: true, }, }, required: ['url'], @@ -1545,6 +1578,7 @@ export const tool: Tool = { setup: { type: 'object', title: 'Setup', + additionalProperties: true, }, }, }, @@ -1837,6 +1871,7 @@ export const tool: Tool = { browserSettings: { type: 'object', title: 'Browsersettings', + additionalProperties: true, }, extensionId: { type: 'string', @@ -1859,6 +1894,7 @@ export const tool: Tool = { type: 'array', items: { type: 'object', + additionalProperties: true, }, }, ], @@ -2052,6 +2088,7 @@ export const tool: Tool = { title: 'Coordinate', items: { type: 'object', + additionalProperties: true, }, }, text: { @@ -2113,6 +2150,7 @@ export const tool: Tool = { params: { type: 'object', title: 'Params', + additionalProperties: true, }, }, required: ['file'], @@ -2129,6 +2167,7 @@ export const tool: Tool = { params: { type: 'object', title: 'Params', + additionalProperties: true, }, }, required: ['llamaparse_api_key'], @@ -2153,6 +2192,7 @@ export const tool: Tool = { setup: { type: 'object', title: 'Setup', + additionalProperties: true, }, }, }, @@ -2225,6 +2265,7 @@ export const tool: Tool = { upload_params: { type: 'object', title: 'Upload Params', + additionalProperties: true, }, }, required: ['file'], @@ -2249,6 +2290,7 @@ export const tool: Tool = { params: { type: 'object', title: 'Params', + additionalProperties: true, }, }, required: ['cloudinary_api_key', 'cloudinary_api_secret', 'cloudinary_cloud_name'], @@ -2290,6 +2332,7 @@ export const tool: Tool = { title: 'Transformation', items: { type: 'object', + additionalProperties: true, }, }, return_base64: { @@ -2319,6 +2362,7 @@ export const tool: Tool = { setup: { type: 'object', title: 'Setup', + additionalProperties: true, }, }, }, @@ -2397,6 +2441,7 @@ export const tool: Tool = { partition_params: { type: 'object', title: 'Partition Params', + additionalProperties: true, }, }, required: ['file'], @@ -2413,6 +2458,7 @@ export const tool: Tool = { retry_config: { type: 'object', title: 'Retry Config', + additionalProperties: true, }, server: { type: 'string', @@ -2429,6 +2475,7 @@ export const tool: Tool = { url_params: { type: 'object', title: 'Url Params', + additionalProperties: true, }, }, required: ['unstructured_api_key'], @@ -2529,6 +2576,7 @@ export const tool: Tool = { arguments: { type: 'object', title: 'Arguments', + additionalProperties: true, }, resource_id: { type: 'string', @@ -2584,6 +2632,7 @@ export const tool: Tool = { set: { type: 'object', title: 'Set', + additionalProperties: true, }, kind_: { type: 'string', @@ -2629,6 +2678,7 @@ export const tool: Tool = { anyOf: [ { type: 'object', + additionalProperties: true, }, { type: 'string', @@ -2656,6 +2706,7 @@ export const tool: Tool = { return: { type: 'object', title: 'Return', + additionalProperties: true, }, kind_: { type: 'string', @@ -2756,6 +2807,7 @@ export const tool: Tool = { info: { type: 'object', title: 'Info', + additionalProperties: true, }, }, required: ['info'], @@ -3015,6 +3067,7 @@ export const tool: Tool = { initial: { type: 'object', title: 'Initial', + additionalProperties: true, }, kind_: { type: 'string', @@ -3287,6 +3340,7 @@ export const tool: Tool = { initial: { type: 'object', title: 'Initial', + additionalProperties: true, }, kind_: { type: 'string', diff --git a/packages/mcp-server/src/tools/tasks/create-tasks.ts b/packages/mcp-server/src/tools/tasks/create-tasks.ts index 1e0c867e..8d1cda88 100644 --- a/packages/mcp-server/src/tools/tasks/create-tasks.ts +++ b/packages/mcp-server/src/tools/tasks/create-tasks.ts @@ -273,6 +273,7 @@ export const tool: Tool = { initial: { type: 'object', title: 'Initial', + additionalProperties: true, }, kind_: { type: 'string', @@ -316,10 +317,12 @@ export const tool: Tool = { input_schema: { type: 'object', title: 'Input Schema', + additionalProperties: true, }, metadata: { type: 'object', title: 'Metadata', + additionalProperties: true, }, tools: { type: 'array', @@ -366,14 +369,17 @@ export const tool: Tool = { cookies: { type: 'object', title: 'Cookies', + additionalProperties: true, }, data: { type: 'object', title: 'Data', + additionalProperties: true, }, files: { type: 'object', title: 'Files', + additionalProperties: true, }, follow_redirects: { type: 'boolean', @@ -382,6 +388,7 @@ export const tool: Tool = { headers: { type: 'object', title: 'Headers', + additionalProperties: true, }, include_response_content: { type: 'boolean', @@ -390,6 +397,7 @@ export const tool: Tool = { json: { type: 'object', title: 'Json', + additionalProperties: true, }, params: { anyOf: [ @@ -398,6 +406,7 @@ export const tool: Tool = { }, { type: 'object', + additionalProperties: true, }, ], title: 'Params', @@ -410,6 +419,7 @@ export const tool: Tool = { properties: { type: 'object', title: 'Properties', + additionalProperties: true, }, additionalProperties: { type: 'boolean', @@ -432,10 +442,12 @@ export const tool: Tool = { schema: { type: 'object', title: 'Schema', + additionalProperties: true, }, secrets: { type: 'object', title: 'Secrets', + additionalProperties: true, }, timeout: { type: 'integer', @@ -553,6 +565,7 @@ export const tool: Tool = { evaluate: { type: 'object', title: 'Evaluate', + additionalProperties: true, }, kind_: { type: 'string', @@ -578,6 +591,7 @@ export const tool: Tool = { anyOf: [ { type: 'object', + additionalProperties: true, }, { type: 'string', @@ -816,6 +830,7 @@ export const tool: Tool = { settings: { type: 'object', title: 'Settings', + additionalProperties: true, }, tool_choice: { anyOf: [ @@ -928,14 +943,17 @@ export const tool: Tool = { cookies: { type: 'object', title: 'Cookies', + additionalProperties: true, }, data: { type: 'object', title: 'Data', + additionalProperties: true, }, files: { type: 'object', title: 'Files', + additionalProperties: true, }, follow_redirects: { type: 'boolean', @@ -944,6 +962,7 @@ export const tool: Tool = { headers: { type: 'object', title: 'Headers', + additionalProperties: true, }, include_response_content: { type: 'boolean', @@ -952,6 +971,7 @@ export const tool: Tool = { json: { type: 'object', title: 'Json', + additionalProperties: true, }, params: { anyOf: [ @@ -960,6 +980,7 @@ export const tool: Tool = { }, { type: 'object', + additionalProperties: true, }, ], title: 'Params', @@ -972,6 +993,7 @@ export const tool: Tool = { properties: { type: 'object', title: 'Properties', + additionalProperties: true, }, additionalProperties: { type: 'boolean', @@ -994,10 +1016,12 @@ export const tool: Tool = { schema: { type: 'object', title: 'Schema', + additionalProperties: true, }, secrets: { type: 'object', title: 'Secrets', + additionalProperties: true, }, timeout: { type: 'integer', @@ -1128,6 +1152,7 @@ export const tool: Tool = { api_call: { type: 'object', title: 'Api Call', + additionalProperties: true, }, bash_20241022: { $ref: '#/$defs/chosen_bash20241022', @@ -1138,10 +1163,12 @@ export const tool: Tool = { integration: { type: 'object', title: 'Integration', + additionalProperties: true, }, system: { type: 'object', title: 'System', + additionalProperties: true, }, text_editor_20241022: { $ref: '#/$defs/chosen_text_editor20241022', @@ -1315,14 +1342,17 @@ export const tool: Tool = { description: { type: 'object', title: 'Description', + additionalProperties: true, }, name: { type: 'object', title: 'Name', + additionalProperties: true, }, parameters: { type: 'object', title: 'Parameters', + additionalProperties: true, }, }, }, @@ -1333,6 +1363,7 @@ export const tool: Tool = { arguments: { type: 'object', title: 'Arguments', + additionalProperties: true, }, method: { type: 'string', @@ -1346,6 +1377,7 @@ export const tool: Tool = { setup: { type: 'object', title: 'Setup', + additionalProperties: true, }, }, }, @@ -1505,6 +1537,7 @@ export const tool: Tool = { params: { type: 'object', title: 'Params', + additionalProperties: true, }, }, required: ['url'], @@ -1541,6 +1574,7 @@ export const tool: Tool = { setup: { type: 'object', title: 'Setup', + additionalProperties: true, }, }, }, @@ -1833,6 +1867,7 @@ export const tool: Tool = { browserSettings: { type: 'object', title: 'Browsersettings', + additionalProperties: true, }, extensionId: { type: 'string', @@ -1855,6 +1890,7 @@ export const tool: Tool = { type: 'array', items: { type: 'object', + additionalProperties: true, }, }, ], @@ -2048,6 +2084,7 @@ export const tool: Tool = { title: 'Coordinate', items: { type: 'object', + additionalProperties: true, }, }, text: { @@ -2109,6 +2146,7 @@ export const tool: Tool = { params: { type: 'object', title: 'Params', + additionalProperties: true, }, }, required: ['file'], @@ -2125,6 +2163,7 @@ export const tool: Tool = { params: { type: 'object', title: 'Params', + additionalProperties: true, }, }, required: ['llamaparse_api_key'], @@ -2149,6 +2188,7 @@ export const tool: Tool = { setup: { type: 'object', title: 'Setup', + additionalProperties: true, }, }, }, @@ -2221,6 +2261,7 @@ export const tool: Tool = { upload_params: { type: 'object', title: 'Upload Params', + additionalProperties: true, }, }, required: ['file'], @@ -2245,6 +2286,7 @@ export const tool: Tool = { params: { type: 'object', title: 'Params', + additionalProperties: true, }, }, required: ['cloudinary_api_key', 'cloudinary_api_secret', 'cloudinary_cloud_name'], @@ -2286,6 +2328,7 @@ export const tool: Tool = { title: 'Transformation', items: { type: 'object', + additionalProperties: true, }, }, return_base64: { @@ -2315,6 +2358,7 @@ export const tool: Tool = { setup: { type: 'object', title: 'Setup', + additionalProperties: true, }, }, }, @@ -2393,6 +2437,7 @@ export const tool: Tool = { partition_params: { type: 'object', title: 'Partition Params', + additionalProperties: true, }, }, required: ['file'], @@ -2409,6 +2454,7 @@ export const tool: Tool = { retry_config: { type: 'object', title: 'Retry Config', + additionalProperties: true, }, server: { type: 'string', @@ -2425,6 +2471,7 @@ export const tool: Tool = { url_params: { type: 'object', title: 'Url Params', + additionalProperties: true, }, }, required: ['unstructured_api_key'], @@ -2525,6 +2572,7 @@ export const tool: Tool = { arguments: { type: 'object', title: 'Arguments', + additionalProperties: true, }, resource_id: { type: 'string', @@ -2580,6 +2628,7 @@ export const tool: Tool = { set: { type: 'object', title: 'Set', + additionalProperties: true, }, kind_: { type: 'string', @@ -2625,6 +2674,7 @@ export const tool: Tool = { anyOf: [ { type: 'object', + additionalProperties: true, }, { type: 'string', @@ -2652,6 +2702,7 @@ export const tool: Tool = { return: { type: 'object', title: 'Return', + additionalProperties: true, }, kind_: { type: 'string', @@ -2752,6 +2803,7 @@ export const tool: Tool = { info: { type: 'object', title: 'Info', + additionalProperties: true, }, }, required: ['info'], @@ -3011,6 +3063,7 @@ export const tool: Tool = { initial: { type: 'object', title: 'Initial', + additionalProperties: true, }, kind_: { type: 'string', @@ -3283,6 +3336,7 @@ export const tool: Tool = { initial: { type: 'object', title: 'Initial', + additionalProperties: true, }, kind_: { type: 'string', diff --git a/packages/mcp-server/src/tools/users/create-or-update-users.ts b/packages/mcp-server/src/tools/users/create-or-update-users.ts index 4b389863..2dd98dc4 100644 --- a/packages/mcp-server/src/tools/users/create-or-update-users.ts +++ b/packages/mcp-server/src/tools/users/create-or-update-users.ts @@ -18,7 +18,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'create_or_update_users', description: - "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nCreate Or Update User\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/user',\n $defs: {\n user: {\n type: 'object',\n title: 'User',\n properties: {\n id: {\n type: 'string',\n title: 'Id'\n },\n created_at: {\n type: 'string',\n title: 'Created At',\n format: 'date-time'\n },\n updated_at: {\n type: 'string',\n title: 'Updated At',\n format: 'date-time'\n },\n about: {\n type: 'string',\n title: 'About'\n },\n metadata: {\n type: 'object',\n title: 'Metadata'\n },\n name: {\n type: 'string',\n title: 'Name'\n },\n project: {\n type: 'string',\n title: 'Project'\n }\n },\n required: [ 'id',\n 'created_at',\n 'updated_at'\n ]\n }\n }\n}\n```", + "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nCreate Or Update User\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/user',\n $defs: {\n user: {\n type: 'object',\n title: 'User',\n properties: {\n id: {\n type: 'string',\n title: 'Id'\n },\n created_at: {\n type: 'string',\n title: 'Created At',\n format: 'date-time'\n },\n updated_at: {\n type: 'string',\n title: 'Updated At',\n format: 'date-time'\n },\n about: {\n type: 'string',\n title: 'About'\n },\n metadata: {\n type: 'object',\n title: 'Metadata',\n additionalProperties: true\n },\n name: {\n type: 'string',\n title: 'Name'\n },\n project: {\n type: 'string',\n title: 'Project'\n }\n },\n required: [ 'id',\n 'created_at',\n 'updated_at'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { @@ -33,6 +33,7 @@ export const tool: Tool = { metadata: { type: 'object', title: 'Metadata', + additionalProperties: true, }, name: { type: 'string', diff --git a/packages/mcp-server/src/tools/users/create-users.ts b/packages/mcp-server/src/tools/users/create-users.ts index 7648dcfa..ebdc8389 100644 --- a/packages/mcp-server/src/tools/users/create-users.ts +++ b/packages/mcp-server/src/tools/users/create-users.ts @@ -18,7 +18,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'create_users', description: - "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nCreate User\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/user',\n $defs: {\n user: {\n type: 'object',\n title: 'User',\n properties: {\n id: {\n type: 'string',\n title: 'Id'\n },\n created_at: {\n type: 'string',\n title: 'Created At',\n format: 'date-time'\n },\n updated_at: {\n type: 'string',\n title: 'Updated At',\n format: 'date-time'\n },\n about: {\n type: 'string',\n title: 'About'\n },\n metadata: {\n type: 'object',\n title: 'Metadata'\n },\n name: {\n type: 'string',\n title: 'Name'\n },\n project: {\n type: 'string',\n title: 'Project'\n }\n },\n required: [ 'id',\n 'created_at',\n 'updated_at'\n ]\n }\n }\n}\n```", + "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nCreate User\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/user',\n $defs: {\n user: {\n type: 'object',\n title: 'User',\n properties: {\n id: {\n type: 'string',\n title: 'Id'\n },\n created_at: {\n type: 'string',\n title: 'Created At',\n format: 'date-time'\n },\n updated_at: {\n type: 'string',\n title: 'Updated At',\n format: 'date-time'\n },\n about: {\n type: 'string',\n title: 'About'\n },\n metadata: {\n type: 'object',\n title: 'Metadata',\n additionalProperties: true\n },\n name: {\n type: 'string',\n title: 'Name'\n },\n project: {\n type: 'string',\n title: 'Project'\n }\n },\n required: [ 'id',\n 'created_at',\n 'updated_at'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { @@ -29,6 +29,7 @@ export const tool: Tool = { metadata: { type: 'object', title: 'Metadata', + additionalProperties: true, }, name: { type: 'string', diff --git a/packages/mcp-server/src/tools/users/docs/bulk-delete-users-docs.ts b/packages/mcp-server/src/tools/users/docs/bulk-delete-users-docs.ts index 222d62d8..1880ba3e 100644 --- a/packages/mcp-server/src/tools/users/docs/bulk-delete-users-docs.ts +++ b/packages/mcp-server/src/tools/users/docs/bulk-delete-users-docs.ts @@ -33,6 +33,7 @@ export const tool: Tool = { metadata_filter: { type: 'object', title: 'Metadata Filter', + additionalProperties: true, }, jq_filter: { type: 'string', diff --git a/packages/mcp-server/src/tools/users/docs/create-users-docs.ts b/packages/mcp-server/src/tools/users/docs/create-users-docs.ts index f2093fd4..f5efe679 100644 --- a/packages/mcp-server/src/tools/users/docs/create-users-docs.ts +++ b/packages/mcp-server/src/tools/users/docs/create-users-docs.ts @@ -18,7 +18,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'create_users_docs', description: - "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nCreates a new document for a user.\n\nParameters:\n user_id (UUID): The unique identifier of the user associated with the document.\n data (CreateDocRequest): The data to create the document with.\n x_developer_id (UUID): The unique identifier of the developer associated with the document.\n\nReturns:\n Doc: The created document.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/doc',\n $defs: {\n doc: {\n type: 'object',\n title: 'Doc',\n properties: {\n id: {\n type: 'string',\n title: 'Id'\n },\n content: {\n anyOf: [ {\n type: 'string'\n },\n {\n type: 'array',\n items: {\n type: 'string'\n }\n }\n ],\n title: 'Content'\n },\n created_at: {\n type: 'string',\n title: 'Created At',\n format: 'date-time'\n },\n title: {\n type: 'string',\n title: 'Title'\n },\n embedding_dimensions: {\n type: 'integer',\n title: 'Embedding Dimensions'\n },\n embedding_model: {\n type: 'string',\n title: 'Embedding Model'\n },\n embeddings: {\n anyOf: [ {\n type: 'array',\n items: {\n type: 'number'\n }\n },\n {\n type: 'array',\n items: {\n type: 'array',\n items: {\n type: 'number'\n }\n }\n }\n ],\n title: 'Embeddings'\n },\n language: {\n type: 'string',\n title: 'Language'\n },\n metadata: {\n type: 'object',\n title: 'Metadata'\n },\n modality: {\n type: 'string',\n title: 'Modality'\n }\n },\n required: [ 'id',\n 'content',\n 'created_at',\n 'title'\n ]\n }\n }\n}\n```", + "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nCreates a new document for a user.\n\nParameters:\n user_id (UUID): The unique identifier of the user associated with the document.\n data (CreateDocRequest): The data to create the document with.\n x_developer_id (UUID): The unique identifier of the developer associated with the document.\n\nReturns:\n Doc: The created document.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/doc',\n $defs: {\n doc: {\n type: 'object',\n title: 'Doc',\n properties: {\n id: {\n type: 'string',\n title: 'Id'\n },\n content: {\n anyOf: [ {\n type: 'string'\n },\n {\n type: 'array',\n items: {\n type: 'string'\n }\n }\n ],\n title: 'Content'\n },\n created_at: {\n type: 'string',\n title: 'Created At',\n format: 'date-time'\n },\n title: {\n type: 'string',\n title: 'Title'\n },\n embedding_dimensions: {\n type: 'integer',\n title: 'Embedding Dimensions'\n },\n embedding_model: {\n type: 'string',\n title: 'Embedding Model'\n },\n embeddings: {\n anyOf: [ {\n type: 'array',\n items: {\n type: 'number'\n }\n },\n {\n type: 'array',\n items: {\n type: 'array',\n items: {\n type: 'number'\n }\n }\n }\n ],\n title: 'Embeddings'\n },\n language: {\n type: 'string',\n title: 'Language'\n },\n metadata: {\n type: 'object',\n title: 'Metadata',\n additionalProperties: true\n },\n modality: {\n type: 'string',\n title: 'Modality'\n }\n },\n required: [ 'id',\n 'content',\n 'created_at',\n 'title'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { @@ -49,6 +49,7 @@ export const tool: Tool = { connection_pool: { type: 'object', title: 'Connection Pool', + additionalProperties: true, }, embed_instruction: { type: 'string', @@ -57,6 +58,7 @@ export const tool: Tool = { metadata: { type: 'object', title: 'Metadata', + additionalProperties: true, }, jq_filter: { type: 'string', diff --git a/packages/mcp-server/src/tools/users/docs/list-users-docs.ts b/packages/mcp-server/src/tools/users/docs/list-users-docs.ts index 5afed205..b7819be4 100644 --- a/packages/mcp-server/src/tools/users/docs/list-users-docs.ts +++ b/packages/mcp-server/src/tools/users/docs/list-users-docs.ts @@ -18,7 +18,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'list_users_docs', description: - "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nList User Docs\n\n# Response Schema\n```json\n{\n type: 'object',\n title: 'ListResponse[Doc]',\n properties: {\n items: {\n type: 'array',\n title: 'Items',\n items: {\n $ref: '#/$defs/doc'\n }\n }\n },\n required: [ 'items'\n ],\n $defs: {\n doc: {\n type: 'object',\n title: 'Doc',\n properties: {\n id: {\n type: 'string',\n title: 'Id'\n },\n content: {\n anyOf: [ {\n type: 'string'\n },\n {\n type: 'array',\n items: {\n type: 'string'\n }\n }\n ],\n title: 'Content'\n },\n created_at: {\n type: 'string',\n title: 'Created At',\n format: 'date-time'\n },\n title: {\n type: 'string',\n title: 'Title'\n },\n embedding_dimensions: {\n type: 'integer',\n title: 'Embedding Dimensions'\n },\n embedding_model: {\n type: 'string',\n title: 'Embedding Model'\n },\n embeddings: {\n anyOf: [ {\n type: 'array',\n items: {\n type: 'number'\n }\n },\n {\n type: 'array',\n items: {\n type: 'array',\n items: {\n type: 'number'\n }\n }\n }\n ],\n title: 'Embeddings'\n },\n language: {\n type: 'string',\n title: 'Language'\n },\n metadata: {\n type: 'object',\n title: 'Metadata'\n },\n modality: {\n type: 'string',\n title: 'Modality'\n }\n },\n required: [ 'id',\n 'content',\n 'created_at',\n 'title'\n ]\n }\n }\n}\n```", + "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nList User Docs\n\n# Response Schema\n```json\n{\n type: 'object',\n title: 'ListResponse[Doc]',\n properties: {\n items: {\n type: 'array',\n title: 'Items',\n items: {\n $ref: '#/$defs/doc'\n }\n }\n },\n required: [ 'items'\n ],\n $defs: {\n doc: {\n type: 'object',\n title: 'Doc',\n properties: {\n id: {\n type: 'string',\n title: 'Id'\n },\n content: {\n anyOf: [ {\n type: 'string'\n },\n {\n type: 'array',\n items: {\n type: 'string'\n }\n }\n ],\n title: 'Content'\n },\n created_at: {\n type: 'string',\n title: 'Created At',\n format: 'date-time'\n },\n title: {\n type: 'string',\n title: 'Title'\n },\n embedding_dimensions: {\n type: 'integer',\n title: 'Embedding Dimensions'\n },\n embedding_model: {\n type: 'string',\n title: 'Embedding Model'\n },\n embeddings: {\n anyOf: [ {\n type: 'array',\n items: {\n type: 'number'\n }\n },\n {\n type: 'array',\n items: {\n type: 'array',\n items: {\n type: 'number'\n }\n }\n }\n ],\n title: 'Embeddings'\n },\n language: {\n type: 'string',\n title: 'Language'\n },\n metadata: {\n type: 'object',\n title: 'Metadata',\n additionalProperties: true\n },\n modality: {\n type: 'string',\n title: 'Modality'\n }\n },\n required: [ 'id',\n 'content',\n 'created_at',\n 'title'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { @@ -42,6 +42,7 @@ export const tool: Tool = { metadata_filter: { type: 'object', title: 'MetadataFilter', + additionalProperties: true, }, offset: { type: 'integer', diff --git a/packages/mcp-server/src/tools/users/docs/search-users-docs.ts b/packages/mcp-server/src/tools/users/docs/search-users-docs.ts index 30a982ee..d58cdec4 100644 --- a/packages/mcp-server/src/tools/users/docs/search-users-docs.ts +++ b/packages/mcp-server/src/tools/users/docs/search-users-docs.ts @@ -18,7 +18,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'search_users_docs', description: - "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nSearches for documents associated with a specific user.\n\nParameters:\n x_developer_id (UUID): The unique identifier of the developer associated with the user.\n search_params (TextOnlyDocSearchRequest | VectorDocSearchRequest | HybridDocSearchRequest): The parameters for the search.\n user_id (UUID): The unique identifier of the user associated with the documents.\nReturns:\n DocSearchResponse: The search results.\n\n# Response Schema\n```json\n{\n type: 'object',\n title: 'DocSearchResponse',\n properties: {\n docs: {\n type: 'array',\n title: 'Docs',\n items: {\n $ref: '#/$defs/doc_reference'\n }\n },\n time: {\n type: 'number',\n title: 'Time'\n }\n },\n required: [ 'docs',\n 'time'\n ],\n $defs: {\n doc_reference: {\n type: 'object',\n title: 'DocReference',\n properties: {\n id: {\n type: 'string',\n title: 'Id'\n },\n owner: {\n $ref: '#/$defs/doc_owner'\n },\n snippet: {\n $ref: '#/$defs/snippet'\n },\n distance: {\n type: 'number',\n title: 'Distance'\n },\n metadata: {\n type: 'object',\n title: 'Metadata'\n },\n title: {\n type: 'string',\n title: 'Title'\n }\n },\n required: [ 'id',\n 'owner',\n 'snippet'\n ]\n },\n doc_owner: {\n type: 'object',\n title: 'DocOwner',\n properties: {\n id: {\n type: 'string',\n title: 'Id'\n },\n role: {\n type: 'string',\n title: 'Role',\n enum: [ 'user',\n 'agent'\n ]\n }\n },\n required: [ 'id',\n 'role'\n ]\n },\n snippet: {\n type: 'object',\n title: 'Snippet',\n properties: {\n content: {\n type: 'string',\n title: 'Content'\n },\n index: {\n type: 'integer',\n title: 'Index'\n },\n embedding: {\n type: 'array',\n title: 'Embedding',\n items: {\n type: 'number'\n }\n }\n },\n required: [ 'content',\n 'index'\n ]\n }\n }\n}\n```", + "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nSearches for documents associated with a specific user.\n\nParameters:\n x_developer_id (UUID): The unique identifier of the developer associated with the user.\n search_params (TextOnlyDocSearchRequest | VectorDocSearchRequest | HybridDocSearchRequest): The parameters for the search.\n user_id (UUID): The unique identifier of the user associated with the documents.\nReturns:\n DocSearchResponse: The search results.\n\n# Response Schema\n```json\n{\n type: 'object',\n title: 'DocSearchResponse',\n properties: {\n docs: {\n type: 'array',\n title: 'Docs',\n items: {\n $ref: '#/$defs/doc_reference'\n }\n },\n time: {\n type: 'number',\n title: 'Time'\n }\n },\n required: [ 'docs',\n 'time'\n ],\n $defs: {\n doc_reference: {\n type: 'object',\n title: 'DocReference',\n properties: {\n id: {\n type: 'string',\n title: 'Id'\n },\n owner: {\n $ref: '#/$defs/doc_owner'\n },\n snippet: {\n $ref: '#/$defs/snippet'\n },\n distance: {\n type: 'number',\n title: 'Distance'\n },\n metadata: {\n type: 'object',\n title: 'Metadata',\n additionalProperties: true\n },\n title: {\n type: 'string',\n title: 'Title'\n }\n },\n required: [ 'id',\n 'owner',\n 'snippet'\n ]\n },\n doc_owner: {\n type: 'object',\n title: 'DocOwner',\n properties: {\n id: {\n type: 'string',\n title: 'Id'\n },\n role: {\n type: 'string',\n title: 'Role',\n enum: [ 'user',\n 'agent'\n ]\n }\n },\n required: [ 'id',\n 'role'\n ]\n },\n snippet: {\n type: 'object',\n title: 'Snippet',\n properties: {\n content: {\n type: 'string',\n title: 'Content'\n },\n index: {\n type: 'integer',\n title: 'Index'\n },\n embedding: {\n type: 'array',\n title: 'Embedding',\n items: {\n type: 'number'\n }\n }\n },\n required: [ 'content',\n 'index'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', anyOf: [ @@ -36,6 +36,7 @@ export const tool: Tool = { connection_pool: { type: 'object', title: 'Connection Pool', + additionalProperties: true, }, include_embeddings: { type: 'boolean', @@ -52,6 +53,7 @@ export const tool: Tool = { metadata_filter: { type: 'object', title: 'Metadata Filter', + additionalProperties: true, }, trigram_similarity_threshold: { type: 'number', @@ -77,6 +79,7 @@ export const tool: Tool = { connection_pool: { type: 'object', title: 'Connection Pool', + additionalProperties: true, }, confidence: { type: 'number', @@ -93,6 +96,7 @@ export const tool: Tool = { metadata_filter: { type: 'object', title: 'Metadata Filter', + additionalProperties: true, }, mmr_strength: { type: 'number', @@ -122,6 +126,7 @@ export const tool: Tool = { connection_pool: { type: 'object', title: 'Connection Pool', + additionalProperties: true, }, alpha: { type: 'number', @@ -150,6 +155,7 @@ export const tool: Tool = { metadata_filter: { type: 'object', title: 'Metadata Filter', + additionalProperties: true, }, mmr_strength: { type: 'number', diff --git a/packages/mcp-server/src/tools/users/get-users.ts b/packages/mcp-server/src/tools/users/get-users.ts index 6736a659..dde4d84f 100644 --- a/packages/mcp-server/src/tools/users/get-users.ts +++ b/packages/mcp-server/src/tools/users/get-users.ts @@ -18,7 +18,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'get_users', description: - "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nGet User Details\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/user',\n $defs: {\n user: {\n type: 'object',\n title: 'User',\n properties: {\n id: {\n type: 'string',\n title: 'Id'\n },\n created_at: {\n type: 'string',\n title: 'Created At',\n format: 'date-time'\n },\n updated_at: {\n type: 'string',\n title: 'Updated At',\n format: 'date-time'\n },\n about: {\n type: 'string',\n title: 'About'\n },\n metadata: {\n type: 'object',\n title: 'Metadata'\n },\n name: {\n type: 'string',\n title: 'Name'\n },\n project: {\n type: 'string',\n title: 'Project'\n }\n },\n required: [ 'id',\n 'created_at',\n 'updated_at'\n ]\n }\n }\n}\n```", + "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nGet User Details\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/user',\n $defs: {\n user: {\n type: 'object',\n title: 'User',\n properties: {\n id: {\n type: 'string',\n title: 'Id'\n },\n created_at: {\n type: 'string',\n title: 'Created At',\n format: 'date-time'\n },\n updated_at: {\n type: 'string',\n title: 'Updated At',\n format: 'date-time'\n },\n about: {\n type: 'string',\n title: 'About'\n },\n metadata: {\n type: 'object',\n title: 'Metadata',\n additionalProperties: true\n },\n name: {\n type: 'string',\n title: 'Name'\n },\n project: {\n type: 'string',\n title: 'Project'\n }\n },\n required: [ 'id',\n 'created_at',\n 'updated_at'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/users/list-users.ts b/packages/mcp-server/src/tools/users/list-users.ts index 86894fa6..f9518167 100644 --- a/packages/mcp-server/src/tools/users/list-users.ts +++ b/packages/mcp-server/src/tools/users/list-users.ts @@ -18,7 +18,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'list_users', description: - "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nList Users\n\n# Response Schema\n```json\n{\n type: 'object',\n title: 'ListResponse[User]',\n properties: {\n items: {\n type: 'array',\n title: 'Items',\n items: {\n $ref: '#/$defs/user'\n }\n }\n },\n required: [ 'items'\n ],\n $defs: {\n user: {\n type: 'object',\n title: 'User',\n properties: {\n id: {\n type: 'string',\n title: 'Id'\n },\n created_at: {\n type: 'string',\n title: 'Created At',\n format: 'date-time'\n },\n updated_at: {\n type: 'string',\n title: 'Updated At',\n format: 'date-time'\n },\n about: {\n type: 'string',\n title: 'About'\n },\n metadata: {\n type: 'object',\n title: 'Metadata'\n },\n name: {\n type: 'string',\n title: 'Name'\n },\n project: {\n type: 'string',\n title: 'Project'\n }\n },\n required: [ 'id',\n 'created_at',\n 'updated_at'\n ]\n }\n }\n}\n```", + "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nList Users\n\n# Response Schema\n```json\n{\n type: 'object',\n title: 'ListResponse[User]',\n properties: {\n items: {\n type: 'array',\n title: 'Items',\n items: {\n $ref: '#/$defs/user'\n }\n }\n },\n required: [ 'items'\n ],\n $defs: {\n user: {\n type: 'object',\n title: 'User',\n properties: {\n id: {\n type: 'string',\n title: 'Id'\n },\n created_at: {\n type: 'string',\n title: 'Created At',\n format: 'date-time'\n },\n updated_at: {\n type: 'string',\n title: 'Updated At',\n format: 'date-time'\n },\n about: {\n type: 'string',\n title: 'About'\n },\n metadata: {\n type: 'object',\n title: 'Metadata',\n additionalProperties: true\n },\n name: {\n type: 'string',\n title: 'Name'\n },\n project: {\n type: 'string',\n title: 'Project'\n }\n },\n required: [ 'id',\n 'created_at',\n 'updated_at'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { @@ -34,6 +34,7 @@ export const tool: Tool = { metadata_filter: { type: 'object', title: 'MetadataFilter', + additionalProperties: true, }, offset: { type: 'integer', diff --git a/packages/mcp-server/src/tools/users/reset-users.ts b/packages/mcp-server/src/tools/users/reset-users.ts index 920215a3..a59b6fae 100644 --- a/packages/mcp-server/src/tools/users/reset-users.ts +++ b/packages/mcp-server/src/tools/users/reset-users.ts @@ -18,7 +18,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'reset_users', description: - "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nUpdate User\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/user',\n $defs: {\n user: {\n type: 'object',\n title: 'User',\n properties: {\n id: {\n type: 'string',\n title: 'Id'\n },\n created_at: {\n type: 'string',\n title: 'Created At',\n format: 'date-time'\n },\n updated_at: {\n type: 'string',\n title: 'Updated At',\n format: 'date-time'\n },\n about: {\n type: 'string',\n title: 'About'\n },\n metadata: {\n type: 'object',\n title: 'Metadata'\n },\n name: {\n type: 'string',\n title: 'Name'\n },\n project: {\n type: 'string',\n title: 'Project'\n }\n },\n required: [ 'id',\n 'created_at',\n 'updated_at'\n ]\n }\n }\n}\n```", + "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nUpdate User\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/user',\n $defs: {\n user: {\n type: 'object',\n title: 'User',\n properties: {\n id: {\n type: 'string',\n title: 'Id'\n },\n created_at: {\n type: 'string',\n title: 'Created At',\n format: 'date-time'\n },\n updated_at: {\n type: 'string',\n title: 'Updated At',\n format: 'date-time'\n },\n about: {\n type: 'string',\n title: 'About'\n },\n metadata: {\n type: 'object',\n title: 'Metadata',\n additionalProperties: true\n },\n name: {\n type: 'string',\n title: 'Name'\n },\n project: {\n type: 'string',\n title: 'Project'\n }\n },\n required: [ 'id',\n 'created_at',\n 'updated_at'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { @@ -33,6 +33,7 @@ export const tool: Tool = { metadata: { type: 'object', title: 'Metadata', + additionalProperties: true, }, name: { type: 'string', diff --git a/packages/mcp-server/src/tools/users/update-users.ts b/packages/mcp-server/src/tools/users/update-users.ts index f03e9d7f..641b3ed0 100644 --- a/packages/mcp-server/src/tools/users/update-users.ts +++ b/packages/mcp-server/src/tools/users/update-users.ts @@ -18,7 +18,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'update_users', description: - "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nPatch User\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/user',\n $defs: {\n user: {\n type: 'object',\n title: 'User',\n properties: {\n id: {\n type: 'string',\n title: 'Id'\n },\n created_at: {\n type: 'string',\n title: 'Created At',\n format: 'date-time'\n },\n updated_at: {\n type: 'string',\n title: 'Updated At',\n format: 'date-time'\n },\n about: {\n type: 'string',\n title: 'About'\n },\n metadata: {\n type: 'object',\n title: 'Metadata'\n },\n name: {\n type: 'string',\n title: 'Name'\n },\n project: {\n type: 'string',\n title: 'Project'\n }\n },\n required: [ 'id',\n 'created_at',\n 'updated_at'\n ]\n }\n }\n}\n```", + "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nPatch User\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/user',\n $defs: {\n user: {\n type: 'object',\n title: 'User',\n properties: {\n id: {\n type: 'string',\n title: 'Id'\n },\n created_at: {\n type: 'string',\n title: 'Created At',\n format: 'date-time'\n },\n updated_at: {\n type: 'string',\n title: 'Updated At',\n format: 'date-time'\n },\n about: {\n type: 'string',\n title: 'About'\n },\n metadata: {\n type: 'object',\n title: 'Metadata',\n additionalProperties: true\n },\n name: {\n type: 'string',\n title: 'Name'\n },\n project: {\n type: 'string',\n title: 'Project'\n }\n },\n required: [ 'id',\n 'created_at',\n 'updated_at'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { @@ -33,6 +33,7 @@ export const tool: Tool = { metadata: { type: 'object', title: 'Metadata', + additionalProperties: true, }, name: { type: 'string', From 0b818f293d83c27fd26f625a69f3e17ead61bbea Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 15 Aug 2025 02:17:57 +0000 Subject: [PATCH 12/89] chore(mcp): document remote server in README.md --- packages/mcp-server/README.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/packages/mcp-server/README.md b/packages/mcp-server/README.md index bc08edf8..44a30c23 100644 --- a/packages/mcp-server/README.md +++ b/packages/mcp-server/README.md @@ -128,6 +128,32 @@ over time, you can manually enable or disable certain capabilities: --resource=cards,accounts --operation=read --tag=kyc --no-tool=create_cards ``` +## Running remotely + +Launching the client with `--transport=http` launches the server as a remote server using Streamable HTTP transport. The `--port` setting can choose the port it will run on, and the `--socket` setting allows it to run on a Unix socket. + +Authorization can be provided via the `Authorization` header using the Bearer scheme. + +Additionally, authorization can be provided via the following headers: +| Header | Equivalent client option | Security scheme | +| ----------------- | ------------------------ | --------------- | +| `x-julep-api-key` | `apiKey` | APIKeyHeader | + +A configuration JSON for this server might look like this: + +```json +{ + "mcpServers": { + "julep_sdk_api": { + "url": "http://localhost:3000", # or wherever the server is hosted + "headers": { + "Authorization": "Bearer " + } + } + } +} +``` + ## Importing the tools and server individually ```js From c62fad2a45e62eb30e842a7a0795316c43fadb6f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 16 Aug 2025 04:54:05 +0000 Subject: [PATCH 13/89] chore(deps): update dependency node-fetch to v2.6.13 --- yarn.lock | 163 +++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 131 insertions(+), 32 deletions(-) diff --git a/yarn.lock b/yarn.lock index 10e2b92d..7fcbec18 100644 --- a/yarn.lock +++ b/yarn.lock @@ -852,19 +852,19 @@ integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== "@types/node-fetch@^2.6.4": - version "2.6.4" - resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.6.4.tgz#1bc3a26de814f6bf466b25aeb1473fa1afe6a660" - integrity sha512-1ZX9fcN4Rvkvgv4E6PAY5WXUFWFcRWxZa3EW83UjycOB9ljJCedb2CupIP4RZMEwF/M3eTcCihbBRgwtGbg5Rg== + version "2.6.13" + resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.6.13.tgz#e0c9b7b5edbdb1b50ce32c127e85e880872d56ee" + integrity sha512-QGpRVpzSaUs30JBSGPjOg4Uveu384erbHBoT1zeONvyCfwQxIkUshLAOqN/k9EjGviPRmWTTe6aH2qySWKTVSw== dependencies: "@types/node" "*" - form-data "^3.0.0" + form-data "^4.0.4" "@types/node@*": - version "20.10.5" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.10.5.tgz#47ad460b514096b7ed63a1dae26fad0914ed3ab2" - integrity sha512-nNPsNE65wjMxEKI93yOP+NPGGBJz/PoN3kZsVLee0XMiJolxSekEVD8wRwBUBqkwc7UWop0edW50yrCQW4CyRw== + version "24.3.0" + resolved "https://registry.yarnpkg.com/@types/node/-/node-24.3.0.tgz#89b09f45cb9a8ee69466f18ee5864e4c3eb84dec" + integrity sha512-aPTXCrfwnDLj4VvXrm+UUCQjNEvJgNA8s5F1cvwQU+3KNltTOkBm1j30uNLyqqPNe7gE3KFzImYoZEfLhp4Yow== dependencies: - undici-types "~5.26.4" + undici-types "~7.10.0" "@types/node@^18.11.18": version "18.11.18" @@ -1097,7 +1097,7 @@ array-union@^2.1.0: asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" - integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= + integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== babel-jest@^29.7.0: version "29.7.0" @@ -1234,6 +1234,14 @@ bundle-name@^3.0.0: dependencies: run-applescript "^5.0.0" +call-bind-apply-helpers@^1.0.1, call-bind-apply-helpers@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz#4b5428c222be985d79c3d82657479dbe0b59b2d6" + integrity sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ== + dependencies: + es-errors "^1.3.0" + function-bind "^1.1.2" + callsites@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" @@ -1433,7 +1441,7 @@ define-lazy-prop@^3.0.0: delayed-stream@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" - integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= + integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== depd@^1.1.2: version "1.1.2" @@ -1474,6 +1482,15 @@ dotenv@^16.4.5: resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.4.5.tgz#cdd3b3b604cb327e286b4762e13502f717cb099f" integrity sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg== +dunder-proto@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/dunder-proto/-/dunder-proto-1.0.1.tgz#d7ae667e1dc83482f8b70fd0f6eefc50da30f58a" + integrity sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A== + dependencies: + call-bind-apply-helpers "^1.0.1" + es-errors "^1.3.0" + gopd "^1.2.0" + electron-to-chromium@^1.4.601: version "1.4.614" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.614.tgz#2fe789d61fa09cb875569f37c309d0c2701f91c0" @@ -1496,6 +1513,33 @@ error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" +es-define-property@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.1.tgz#983eb2f9a6724e9303f61addf011c72e09e0b0fa" + integrity sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g== + +es-errors@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" + integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== + +es-object-atoms@^1.0.0, es-object-atoms@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/es-object-atoms/-/es-object-atoms-1.1.1.tgz#1c4f2c4837327597ce69d2ca190a7fdd172338c1" + integrity sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA== + dependencies: + es-errors "^1.3.0" + +es-set-tostringtag@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz#f31dbbe0c183b00a6d26eb6325c810c0fd18bd4d" + integrity sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA== + dependencies: + es-errors "^1.3.0" + get-intrinsic "^1.2.6" + has-tostringtag "^1.0.2" + hasown "^2.0.2" + escalade@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" @@ -1785,13 +1829,15 @@ form-data-encoder@1.7.2: resolved "https://registry.yarnpkg.com/form-data-encoder/-/form-data-encoder-1.7.2.tgz#1f1ae3dccf58ed4690b86d87e4f57c654fbab040" integrity sha512-qfqtYan3rxrnCk1VYaA4H+Ms9xdpPqvLZa6xmMgFvhO32x7/3J/ExcTd6qpxM0vH2GdMI+poehyBZvqfMTto8A== -form-data@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-3.0.1.tgz#ebd53791b78356a99af9a300d4282c4d5eb9755f" - integrity sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg== +form-data@^4.0.4: + version "4.0.4" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.4.tgz#784cdcce0669a9d68e94d11ac4eea98088edd2c4" + integrity sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow== dependencies: asynckit "^0.4.0" combined-stream "^1.0.8" + es-set-tostringtag "^2.1.0" + hasown "^2.0.2" mime-types "^2.1.12" formdata-node@^4.3.2: @@ -1827,11 +1873,35 @@ get-caller-file@^2.0.5: resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== +get-intrinsic@^1.2.6: + version "1.3.0" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.3.0.tgz#743f0e3b6964a93a5491ed1bffaae054d7f98d01" + integrity sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ== + dependencies: + call-bind-apply-helpers "^1.0.2" + es-define-property "^1.0.1" + es-errors "^1.3.0" + es-object-atoms "^1.1.1" + function-bind "^1.1.2" + get-proto "^1.0.1" + gopd "^1.2.0" + has-symbols "^1.1.0" + hasown "^2.0.2" + math-intrinsics "^1.1.0" + get-package-type@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q== +get-proto@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/get-proto/-/get-proto-1.0.1.tgz#150b3f2743869ef3e851ec0c49d15b1d14d00ee1" + integrity sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g== + dependencies: + dunder-proto "^1.0.1" + es-object-atoms "^1.0.0" + get-stdin@^8.0.0: version "8.0.0" resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-8.0.0.tgz#cbad6a73feb75f6eeb22ba9e01f89aa28aa97a53" @@ -1892,6 +1962,11 @@ globby@^11.1.0: merge2 "^1.4.1" slash "^3.0.0" +gopd@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.2.0.tgz#89f56b8217bdbc8802bd299df6d7f1081d7e51a1" + integrity sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg== + graceful-fs@^4.2.9: version "4.2.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" @@ -1912,6 +1987,18 @@ has-flag@^4.0.0: resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== +has-symbols@^1.0.3, has-symbols@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.1.0.tgz#fc9c6a783a084951d0b971fe1018de813707a338" + integrity sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ== + +has-tostringtag@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.2.tgz#2cdc42d40bef2e5b4eeab7c01a73c54ce7ab5abc" + integrity sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw== + dependencies: + has-symbols "^1.0.3" + hasown@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.0.tgz#f4c513d454a57b7c7e1650778de226b11700546c" @@ -1919,6 +2006,13 @@ hasown@^2.0.0: dependencies: function-bind "^1.1.2" +hasown@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003" + integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== + dependencies: + function-bind "^1.1.2" + html-escaper@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" @@ -2616,6 +2710,11 @@ makeerror@1.0.12: dependencies: tmpl "1.0.5" +math-intrinsics@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/math-intrinsics/-/math-intrinsics-1.1.0.tgz#a0dd74be81e2aa5c2f27e65ce283605ee4e2b7f9" + integrity sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g== + merge-stream@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" @@ -2634,17 +2733,17 @@ micromatch@^4.0.4: braces "^3.0.3" picomatch "^2.3.1" -mime-db@1.51.0: - version "1.51.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.51.0.tgz#d9ff62451859b18342d960850dc3cfb77e63fb0c" - integrity sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g== +mime-db@1.52.0: + version "1.52.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" + integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== mime-types@^2.1.12: - version "2.1.34" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.34.tgz#5a712f9ec1503511a945803640fafe09d3793c24" - integrity sha512-6cP692WwGIs9XXdOO4++N+7qjqv0rqxxVvJ3VHPh/Sc9mVZcQP+ZGhkKiTvWMQRr2tbHkJP/Yn7Y0npb3ZBs4A== + version "2.1.35" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" + integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== dependencies: - mime-db "1.51.0" + mime-db "1.52.0" mimic-fn@^2.1.0: version "2.1.0" @@ -2696,9 +2795,9 @@ node-domexception@1.0.0: integrity sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ== node-fetch@^2.6.7: - version "2.6.11" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.11.tgz#cde7fc71deef3131ef80a738919f999e6edfff25" - integrity sha512-4I6pdBY1EthSqDmJkiNk3JIT8cswwR9nfeW/cPdUagJYEQG7R95WRH74wpz7ma8Gh/9dI9FP+OU+0E4FvtA55w== + version "2.7.0" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d" + integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A== dependencies: whatwg-url "^5.0.0" @@ -3235,7 +3334,7 @@ to-regex-range@^5.0.1: tr46@~0.0.3: version "0.0.3" resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" - integrity sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o= + integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== ts-api-utils@^1.0.1: version "1.3.0" @@ -3337,10 +3436,10 @@ typescript@^4.8.2: resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== -undici-types@~5.26.4: - version "5.26.5" - resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" - integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== +undici-types@~7.10.0: + version "7.10.0" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-7.10.0.tgz#4ac2e058ce56b462b056e629cc6a02393d3ff350" + integrity sha512-t5Fy/nfn+14LuOc2KNYg75vZqClpAiqscVvMygNnlsHBFpSXdJaYtXMcdNLpl/Qvc3P2cB3s6lOV51nqsFq4ag== untildify@^4.0.0: version "4.0.0" @@ -3396,12 +3495,12 @@ web-streams-polyfill@4.0.0-beta.1: webidl-conversions@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" - integrity sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE= + integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== whatwg-url@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" - integrity sha1-lmRU6HZUYuN2RNNib2dCzotwll0= + integrity sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw== dependencies: tr46 "~0.0.3" webidl-conversions "^3.0.0" From 0d69b8d3a63228328cadcaeb97f8ec06942f691e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 16 Aug 2025 02:34:43 +0000 Subject: [PATCH 14/89] chore(mcp): update README --- packages/mcp-server/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/mcp-server/README.md b/packages/mcp-server/README.md index 44a30c23..386a59e2 100644 --- a/packages/mcp-server/README.md +++ b/packages/mcp-server/README.md @@ -139,13 +139,13 @@ Additionally, authorization can be provided via the following headers: | ----------------- | ------------------------ | --------------- | | `x-julep-api-key` | `apiKey` | APIKeyHeader | -A configuration JSON for this server might look like this: +A configuration JSON for this server might look like this, assuming the server is hosted at `http://localhost:3000`: ```json { "mcpServers": { "julep_sdk_api": { - "url": "http://localhost:3000", # or wherever the server is hosted + "url": "http://localhost:3000", "headers": { "Authorization": "Bearer " } From 12fb0e6a7dd00c23e1be0187f9980c9e3494974e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 16 Aug 2025 02:37:47 +0000 Subject: [PATCH 15/89] chore(internal): formatting change --- src/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/index.ts b/src/index.ts index 75ad52af..488439d2 100644 --- a/src/index.ts +++ b/src/index.ts @@ -340,6 +340,7 @@ Julep.Secrets = Secrets; Julep.Projects = Projects; Julep.ProjectListResponsesOffsetPagination = ProjectListResponsesOffsetPagination; Julep.Healthz = Healthz; + export declare namespace Julep { export type RequestOptions = Core.RequestOptions; From ca31e54b1bb7be289a73cad5ed1fd445a9b9f99c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 19 Aug 2025 02:11:45 +0000 Subject: [PATCH 16/89] feat(mcp): parse query string as mcp client options in mcp server --- packages/mcp-server/README.md | 13 ++ packages/mcp-server/package.json | 8 +- packages/mcp-server/src/compat.ts | 4 +- packages/mcp-server/src/http.ts | 25 ++- packages/mcp-server/src/index.ts | 4 +- packages/mcp-server/src/options.ts | 121 ++++++++++- packages/mcp-server/tests/options.test.ts | 240 +++++++++++++++++++++- packages/mcp-server/yarn.lock | 116 +++++++++-- 8 files changed, 499 insertions(+), 32 deletions(-) diff --git a/packages/mcp-server/README.md b/packages/mcp-server/README.md index 386a59e2..7b2e0657 100644 --- a/packages/mcp-server/README.md +++ b/packages/mcp-server/README.md @@ -154,6 +154,19 @@ A configuration JSON for this server might look like this, assuming the server i } ``` +The command-line arguments for filtering tools and specifying clients can also be used as query parameters in the URL. +For example, to exclude specific tools while including others, use the URL: + +``` +http://localhost:3000?resource=cards&resource=accounts&no_tool=create_cards +``` + +Or, to configure for the Cursor client, with a custom max tool name length, use the URL: + +``` +http://localhost:3000?client=cursor&capability=tool-name-length%3D40 +``` + ## Importing the tools and server individually ```js diff --git a/packages/mcp-server/package.json b/packages/mcp-server/package.json index 0b8d1181..869be3ba 100644 --- a/packages/mcp-server/package.json +++ b/packages/mcp-server/package.json @@ -28,20 +28,22 @@ }, "dependencies": { "@julep/sdk": "file:../../dist/", + "@cloudflare/cabidela": "^0.2.4", "@modelcontextprotocol/sdk": "^1.11.5", "express": "^5.1.0", "jq-web": "https://github.com/stainless-api/jq-web/releases/download/v0.8.6/jq-web.tar.gz", + "qs": "^6.14.0", "yargs": "^17.7.2", - "@cloudflare/cabidela": "^0.2.4", "zod": "^3.25.20", - "zod-to-json-schema": "^3.24.5" + "zod-to-json-schema": "^3.24.5", + "zod-validation-error": "^4.0.1" }, "bin": { "mcp-server": "dist/index.js" }, "devDependencies": { - "@types/jest": "^29.4.0", "@types/express": "^5.0.3", + "@types/jest": "^29.4.0", "@types/yargs": "^17.0.8", "@typescript-eslint/eslint-plugin": "8.31.1", "@typescript-eslint/parser": "8.31.1", diff --git a/packages/mcp-server/src/compat.ts b/packages/mcp-server/src/compat.ts index 7afd77fd..1df7a7aa 100644 --- a/packages/mcp-server/src/compat.ts +++ b/packages/mcp-server/src/compat.ts @@ -1,4 +1,5 @@ import { Tool } from '@modelcontextprotocol/sdk/types.js'; +import { z } from 'zod'; import { Endpoint } from './tools'; export interface ClientCapabilities { @@ -19,7 +20,8 @@ export const defaultClientCapabilities: ClientCapabilities = { toolNameLength: undefined, }; -export type ClientType = 'openai-agents' | 'claude' | 'claude-code' | 'cursor'; +export const ClientType = z.enum(['openai-agents', 'claude', 'claude-code', 'cursor']); +export type ClientType = z.infer; // Client presets for compatibility // Note that these could change over time as models get better, so this is diff --git a/packages/mcp-server/src/http.ts b/packages/mcp-server/src/http.ts index e188c9ed..ca6d3d25 100644 --- a/packages/mcp-server/src/http.ts +++ b/packages/mcp-server/src/http.ts @@ -4,13 +4,33 @@ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp'; import { StreamableHTTPServerTransport } from '@modelcontextprotocol/sdk/server/streamableHttp.js'; import express from 'express'; -import { McpOptions } from './options'; +import { fromError } from 'zod-validation-error/v3'; +import { McpOptions, parseQueryOptions } from './options'; import { initMcpServer, newMcpServer } from './server'; import { parseAuthHeaders } from './headers'; import { Endpoint } from './tools'; -const newServer = (mcpOptions: McpOptions, req: express.Request, res: express.Response): McpServer | null => { +const newServer = ( + defaultMcpOptions: McpOptions, + req: express.Request, + res: express.Response, +): McpServer | null => { const server = newMcpServer(); + + let mcpOptions: McpOptions; + try { + mcpOptions = parseQueryOptions(defaultMcpOptions, req.query); + } catch (error) { + res.status(400).json({ + jsonrpc: '2.0', + error: { + code: -32000, + message: `Invalid request: ${fromError(error)}`, + }, + }); + return null; + } + try { const authOptions = parseAuthHeaders(req); initMcpServer({ @@ -71,6 +91,7 @@ const del = async (req: express.Request, res: express.Response) => { export const streamableHTTPApp = (options: McpOptions): express.Express => { const app = express(); + app.set('query parser', 'extended'); app.use(express.json()); app.get('/', get); diff --git a/packages/mcp-server/src/index.ts b/packages/mcp-server/src/index.ts index 4c71a3bc..05b2ba63 100644 --- a/packages/mcp-server/src/index.ts +++ b/packages/mcp-server/src/index.ts @@ -2,7 +2,7 @@ import { selectTools } from './server'; import { Endpoint, endpoints } from './tools'; -import { McpOptions, parseOptions } from './options'; +import { McpOptions, parseCLIOptions } from './options'; import { launchStdioServer } from './stdio'; import { launchStreamableHTTPServer } from './http'; @@ -40,7 +40,7 @@ if (require.main === module) { function parseOptionsOrError() { try { - return parseOptions(); + return parseCLIOptions(); } catch (error) { console.error('Error parsing options:', error); process.exit(1); diff --git a/packages/mcp-server/src/options.ts b/packages/mcp-server/src/options.ts index c290ca50..0768d931 100644 --- a/packages/mcp-server/src/options.ts +++ b/packages/mcp-server/src/options.ts @@ -1,5 +1,7 @@ +import qs from 'qs'; import yargs from 'yargs'; import { hideBin } from 'yargs/helpers'; +import z from 'zod'; import { endpoints, Filter } from './tools'; import { ClientCapabilities, knownClients, ClientType } from './compat'; @@ -47,7 +49,7 @@ function parseCapabilityValue(cap: string): { name: Capability; value?: number } return { name: cap as Capability }; } -export function parseOptions(): CLIOptions { +export function parseCLIOptions(): CLIOptions { const opts = yargs(hideBin(process.argv)) .option('tools', { type: 'string', @@ -271,6 +273,123 @@ export function parseOptions(): CLIOptions { }; } +const coerceArray = (zodType: T) => + z.preprocess( + (val) => + Array.isArray(val) ? val + : val ? [val] + : val, + z.array(zodType).optional(), + ); + +const QueryOptions = z.object({ + tools: coerceArray(z.enum(['dynamic', 'all'])).describe('Use dynamic tools or all tools'), + no_tools: coerceArray(z.enum(['dynamic', 'all'])).describe('Do not use dynamic tools or all tools'), + tool: coerceArray(z.string()).describe('Include tools matching the specified names'), + resource: coerceArray(z.string()).describe('Include tools matching the specified resources'), + operation: coerceArray(z.enum(['read', 'write'])).describe( + 'Include tools matching the specified operations', + ), + tag: coerceArray(z.string()).describe('Include tools with the specified tags'), + no_tool: coerceArray(z.string()).describe('Exclude tools matching the specified names'), + no_resource: coerceArray(z.string()).describe('Exclude tools matching the specified resources'), + no_operation: coerceArray(z.enum(['read', 'write'])).describe( + 'Exclude tools matching the specified operations', + ), + no_tag: coerceArray(z.string()).describe('Exclude tools with the specified tags'), + client: ClientType.optional().describe('Specify the MCP client being used'), + capability: coerceArray(z.string()).describe('Specify client capabilities'), + no_capability: coerceArray(z.enum(CAPABILITY_CHOICES)).describe('Unset client capabilities'), +}); + +export function parseQueryOptions(defaultOptions: McpOptions, query: unknown): McpOptions { + const queryObject = typeof query === 'string' ? qs.parse(query) : query; + const queryOptions = QueryOptions.parse(queryObject); + + const filters: Filter[] = [...defaultOptions.filters]; + + for (const resource of queryOptions.resource || []) { + filters.push({ type: 'resource', op: 'include', value: resource }); + } + for (const operation of queryOptions.operation || []) { + filters.push({ type: 'operation', op: 'include', value: operation }); + } + for (const tag of queryOptions.tag || []) { + filters.push({ type: 'tag', op: 'include', value: tag }); + } + for (const tool of queryOptions.tool || []) { + filters.push({ type: 'tool', op: 'include', value: tool }); + } + for (const resource of queryOptions.no_resource || []) { + filters.push({ type: 'resource', op: 'exclude', value: resource }); + } + for (const operation of queryOptions.no_operation || []) { + filters.push({ type: 'operation', op: 'exclude', value: operation }); + } + for (const tag of queryOptions.no_tag || []) { + filters.push({ type: 'tag', op: 'exclude', value: tag }); + } + for (const tool of queryOptions.no_tool || []) { + filters.push({ type: 'tool', op: 'exclude', value: tool }); + } + + // Parse client capabilities + const clientCapabilities: ClientCapabilities = { + topLevelUnions: true, + validJson: true, + refs: true, + unions: true, + formats: true, + toolNameLength: undefined, + ...defaultOptions.capabilities, + }; + + for (const cap of queryOptions.capability || []) { + const parsed = parseCapabilityValue(cap); + if (parsed.name === 'top-level-unions') { + clientCapabilities.topLevelUnions = true; + } else if (parsed.name === 'valid-json') { + clientCapabilities.validJson = true; + } else if (parsed.name === 'refs') { + clientCapabilities.refs = true; + } else if (parsed.name === 'unions') { + clientCapabilities.unions = true; + } else if (parsed.name === 'formats') { + clientCapabilities.formats = true; + } else if (parsed.name === 'tool-name-length') { + clientCapabilities.toolNameLength = parsed.value; + } + } + + for (const cap of queryOptions.no_capability || []) { + if (cap === 'top-level-unions') { + clientCapabilities.topLevelUnions = false; + } else if (cap === 'valid-json') { + clientCapabilities.validJson = false; + } else if (cap === 'refs') { + clientCapabilities.refs = false; + } else if (cap === 'unions') { + clientCapabilities.unions = false; + } else if (cap === 'formats') { + clientCapabilities.formats = false; + } else if (cap === 'tool-name-length') { + clientCapabilities.toolNameLength = undefined; + } + } + + return { + client: queryOptions.client ?? defaultOptions.client, + includeDynamicTools: + defaultOptions.includeDynamicTools ?? + (queryOptions.tools?.includes('dynamic') && !queryOptions.no_tools?.includes('dynamic')), + includeAllTools: + defaultOptions.includeAllTools ?? + (queryOptions.tools?.includes('all') && !queryOptions.no_tools?.includes('all')), + filters, + capabilities: clientCapabilities, + }; +} + function getCapabilitiesExplanation(): string { return ` Client Capabilities Explanation: diff --git a/packages/mcp-server/tests/options.test.ts b/packages/mcp-server/tests/options.test.ts index 264aca55..08ea1f18 100644 --- a/packages/mcp-server/tests/options.test.ts +++ b/packages/mcp-server/tests/options.test.ts @@ -1,4 +1,4 @@ -import { parseOptions } from '../src/options'; +import { parseCLIOptions, parseQueryOptions } from '../src/options'; import { Filter } from '../src/tools'; import { parseEmbeddedJSON } from '../src/compat'; @@ -11,7 +11,7 @@ const mockArgv = (args: string[]) => { }; }; -describe('parseOptions', () => { +describe('parseCLIOptions', () => { it('should parse basic filter options', () => { const cleanup = mockArgv([ '--tool=test-tool', @@ -20,7 +20,7 @@ describe('parseOptions', () => { '--tag=test-tag', ]); - const result = parseOptions(); + const result = parseCLIOptions(); expect(result.filters).toEqual([ { type: 'tag', op: 'include', value: 'test-tag' }, @@ -52,7 +52,7 @@ describe('parseOptions', () => { '--no-tag=exclude-tag', ]); - const result = parseOptions(); + const result = parseCLIOptions(); expect(result.filters).toEqual([ { type: 'tag', op: 'exclude', value: 'exclude-tag' }, @@ -76,7 +76,7 @@ describe('parseOptions', () => { it('should parse client presets', () => { const cleanup = mockArgv(['--client=openai-agents']); - const result = parseOptions(); + const result = parseCLIOptions(); expect(result.client).toEqual('openai-agents'); @@ -92,7 +92,7 @@ describe('parseOptions', () => { '--capability=tool-name-length=40', ]); - const result = parseOptions(); + const result = parseCLIOptions(); expect(result.capabilities).toEqual({ topLevelUnions: true, @@ -109,7 +109,7 @@ describe('parseOptions', () => { it('should handle list option', () => { const cleanup = mockArgv(['--list']); - const result = parseOptions(); + const result = parseCLIOptions(); expect(result.list).toBe(true); @@ -119,7 +119,7 @@ describe('parseOptions', () => { it('should handle multiple filters of the same type', () => { const cleanup = mockArgv(['--tool=tool1', '--tool=tool2', '--resource=res1', '--resource=res2']); - const result = parseOptions(); + const result = parseCLIOptions(); expect(result.filters).toEqual([ { type: 'resource', op: 'include', value: 'res1' }, @@ -138,7 +138,7 @@ describe('parseOptions', () => { '--capability=top-level-unions,valid-json,unions', ]); - const result = parseOptions(); + const result = parseCLIOptions(); expect(result.filters).toEqual([ { type: 'resource', op: 'include', value: 'res1' }, @@ -166,7 +166,7 @@ describe('parseOptions', () => { const originalError = console.error; console.error = jest.fn(); - expect(() => parseOptions()).toThrow(); + expect(() => parseCLIOptions()).toThrow(); console.error = originalError; cleanup(); @@ -179,13 +179,231 @@ describe('parseOptions', () => { const originalError = console.error; console.error = jest.fn(); - expect(() => parseOptions()).toThrow(); + expect(() => parseCLIOptions()).toThrow(); console.error = originalError; cleanup(); }); }); +describe('parseQueryOptions', () => { + const defaultOptions = { + client: undefined, + includeDynamicTools: undefined, + includeAllTools: undefined, + filters: [], + capabilities: { + topLevelUnions: true, + validJson: true, + refs: true, + unions: true, + formats: true, + toolNameLength: undefined, + }, + }; + + it('should parse basic filter options from query string', () => { + const query = 'tool=test-tool&resource=test-resource&operation=read&tag=test-tag'; + const result = parseQueryOptions(defaultOptions, query); + + expect(result.filters).toEqual([ + { type: 'resource', op: 'include', value: 'test-resource' }, + { type: 'operation', op: 'include', value: 'read' }, + { type: 'tag', op: 'include', value: 'test-tag' }, + { type: 'tool', op: 'include', value: 'test-tool' }, + ]); + + expect(result.capabilities).toEqual({ + topLevelUnions: true, + validJson: true, + refs: true, + unions: true, + formats: true, + toolNameLength: undefined, + }); + }); + + it('should parse exclusion filters from query string', () => { + const query = 'no_tool=exclude-tool&no_resource=exclude-resource&no_operation=write&no_tag=exclude-tag'; + const result = parseQueryOptions(defaultOptions, query); + + expect(result.filters).toEqual([ + { type: 'resource', op: 'exclude', value: 'exclude-resource' }, + { type: 'operation', op: 'exclude', value: 'write' }, + { type: 'tag', op: 'exclude', value: 'exclude-tag' }, + { type: 'tool', op: 'exclude', value: 'exclude-tool' }, + ]); + }); + + it('should parse client option from query string', () => { + const query = 'client=openai-agents'; + const result = parseQueryOptions(defaultOptions, query); + + expect(result.client).toBe('openai-agents'); + }); + + it('should parse client capabilities from query string', () => { + const query = 'capability=top-level-unions&capability=valid-json&capability=tool-name-length%3D40'; + const result = parseQueryOptions(defaultOptions, query); + + expect(result.capabilities).toEqual({ + topLevelUnions: true, + validJson: true, + refs: true, + unions: true, + formats: true, + toolNameLength: 40, + }); + }); + + it('should parse no-capability options from query string', () => { + const query = 'no_capability=top-level-unions&no_capability=refs&no_capability=formats'; + const result = parseQueryOptions(defaultOptions, query); + + expect(result.capabilities).toEqual({ + topLevelUnions: false, + validJson: true, + refs: false, + unions: true, + formats: false, + toolNameLength: undefined, + }); + }); + + it('should parse tools options from query string', () => { + const query = 'tools=dynamic&tools=all'; + const result = parseQueryOptions(defaultOptions, query); + + expect(result.includeDynamicTools).toBe(true); + expect(result.includeAllTools).toBe(true); + }); + + it('should parse no-tools options from query string', () => { + const query = 'tools=dynamic&tools=all&no_tools=dynamic'; + const result = parseQueryOptions(defaultOptions, query); + + expect(result.includeDynamicTools).toBe(false); + expect(result.includeAllTools).toBe(true); + }); + + it('should handle array values in query string', () => { + const query = 'tool[]=tool1&tool[]=tool2&resource[]=res1&resource[]=res2'; + const result = parseQueryOptions(defaultOptions, query); + + expect(result.filters).toEqual([ + { type: 'resource', op: 'include', value: 'res1' }, + { type: 'resource', op: 'include', value: 'res2' }, + { type: 'tool', op: 'include', value: 'tool1' }, + { type: 'tool', op: 'include', value: 'tool2' }, + ]); + }); + + it('should merge with default options', () => { + const defaultWithFilters = { + ...defaultOptions, + filters: [{ type: 'tag' as const, op: 'include' as const, value: 'existing-tag' }], + client: 'cursor' as const, + includeDynamicTools: true, + }; + + const query = 'tool=new-tool&resource=new-resource'; + const result = parseQueryOptions(defaultWithFilters, query); + + expect(result.filters).toEqual([ + { type: 'tag', op: 'include', value: 'existing-tag' }, + { type: 'resource', op: 'include', value: 'new-resource' }, + { type: 'tool', op: 'include', value: 'new-tool' }, + ]); + + expect(result.client).toBe('cursor'); + expect(result.includeDynamicTools).toBe(true); + }); + + it('should override client from default options', () => { + const defaultWithClient = { + ...defaultOptions, + client: 'cursor' as const, + }; + + const query = 'client=openai-agents'; + const result = parseQueryOptions(defaultWithClient, query); + + expect(result.client).toBe('openai-agents'); + }); + + it('should merge capabilities with default options', () => { + const defaultWithCapabilities = { + ...defaultOptions, + capabilities: { + topLevelUnions: false, + validJson: false, + refs: true, + unions: true, + formats: true, + toolNameLength: 30, + }, + }; + + const query = 'capability=top-level-unions&no_capability=refs'; + const result = parseQueryOptions(defaultWithCapabilities, query); + + expect(result.capabilities).toEqual({ + topLevelUnions: true, + validJson: false, + refs: false, + unions: true, + formats: true, + toolNameLength: 30, + }); + }); + + it('should handle empty query string', () => { + const query = ''; + const result = parseQueryOptions(defaultOptions, query); + + expect(result).toEqual(defaultOptions); + }); + + it('should handle invalid query string gracefully', () => { + const query = 'invalid=value&operation=invalid-operation'; + + // Should throw due to Zod validation for invalid operation + expect(() => parseQueryOptions(defaultOptions, query)).toThrow(); + }); + + it('should preserve default undefined values when not specified', () => { + const defaultWithUndefined = { + ...defaultOptions, + client: undefined, + includeDynamicTools: undefined, + includeAllTools: undefined, + }; + + const query = 'tool=test-tool'; + const result = parseQueryOptions(defaultWithUndefined, query); + + expect(result.client).toBeUndefined(); + expect(result.includeDynamicTools).toBeFalsy(); + expect(result.includeAllTools).toBeFalsy(); + }); + + it('should handle complex query with mixed include and exclude filters', () => { + const query = + 'tool=include-tool&no_tool=exclude-tool&resource=include-res&no_resource=exclude-res&operation=read&tag=include-tag&no_tag=exclude-tag'; + const result = parseQueryOptions(defaultOptions, query); + + expect(result.filters).toEqual([ + { type: 'resource', op: 'include', value: 'include-res' }, + { type: 'operation', op: 'include', value: 'read' }, + { type: 'tag', op: 'include', value: 'include-tag' }, + { type: 'tool', op: 'include', value: 'include-tool' }, + { type: 'resource', op: 'exclude', value: 'exclude-res' }, + { type: 'tag', op: 'exclude', value: 'exclude-tag' }, + { type: 'tool', op: 'exclude', value: 'exclude-tool' }, + ]); + }); +}); + describe('parseEmbeddedJSON', () => { it('should not change non-string values', () => { const args = { diff --git a/packages/mcp-server/yarn.lock b/packages/mcp-server/yarn.lock index 9970ec32..707a2de8 100644 --- a/packages/mcp-server/yarn.lock +++ b/packages/mcp-server/yarn.lock @@ -584,15 +584,17 @@ "@jridgewell/resolve-uri" "^3.1.0" "@jridgewell/sourcemap-codec" "^1.4.14" -"@modelcontextprotocol/sdk@^1.6.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@modelcontextprotocol/sdk/-/sdk-1.11.1.tgz#c7f4a1432872ef10130f5d9b0072060c17a3946b" - integrity sha512-9LfmxKTb1v+vUS1/emSk1f5ePmTLkb9Le9AxOB5T0XM59EUumwcS45z05h7aiZx3GI0Bl7mjb3FMEglYj+acuQ== +"@modelcontextprotocol/sdk@^1.11.5": + version "1.17.3" + resolved "https://registry.yarnpkg.com/@modelcontextprotocol/sdk/-/sdk-1.17.3.tgz#cf92354220f0183d28179e96a9bf3a8f6d3211ae" + integrity sha512-JPwUKWSsbzx+DLFznf/QZ32Qa+ptfbUlHhRLrBQBAFu9iI1iYvizM4p+zhhRDceSsPutXp4z+R/HPVphlIiclg== dependencies: + ajv "^6.12.6" content-type "^1.0.5" cors "^2.8.5" - cross-spawn "^7.0.3" + cross-spawn "^7.0.5" eventsource "^3.0.2" + eventsource-parser "^3.0.0" express "^5.0.1" express-rate-limit "^7.5.0" pkce-challenge "^5.0.0" @@ -708,6 +710,40 @@ dependencies: "@babel/types" "^7.20.7" +"@types/body-parser@*": + version "1.19.6" + resolved "https://registry.yarnpkg.com/@types/body-parser/-/body-parser-1.19.6.tgz#1859bebb8fd7dac9918a45d54c1971ab8b5af474" + integrity sha512-HLFeCYgz89uk22N5Qg3dvGvsv46B8GLvKKo1zKG4NybA8U2DiEO3w9lqGg29t/tfLRJpJ6iQxnVw4OnB7MoM9g== + dependencies: + "@types/connect" "*" + "@types/node" "*" + +"@types/connect@*": + version "3.4.38" + resolved "https://registry.yarnpkg.com/@types/connect/-/connect-3.4.38.tgz#5ba7f3bc4fbbdeaff8dded952e5ff2cc53f8d858" + integrity sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug== + dependencies: + "@types/node" "*" + +"@types/express-serve-static-core@^5.0.0": + version "5.0.7" + resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-5.0.7.tgz#2fa94879c9d46b11a5df4c74ac75befd6b283de6" + integrity sha512-R+33OsgWw7rOhD1emjU7dzCDHucJrgJXMA5PYCzJxVil0dsyx5iBEPHqpPfiKNJQb7lZ1vxwoLR4Z87bBUpeGQ== + dependencies: + "@types/node" "*" + "@types/qs" "*" + "@types/range-parser" "*" + "@types/send" "*" + +"@types/express@^5.0.3": + version "5.0.3" + resolved "https://registry.yarnpkg.com/@types/express/-/express-5.0.3.tgz#6c4bc6acddc2e2a587142e1d8be0bce20757e956" + integrity sha512-wGA0NX93b19/dZC1J18tKWVIYWyyF2ZjT9vin/NRu0qzzvfVzWjs04iq2rQ3H65vCTQYlRqs3YHfY7zjdV+9Kw== + dependencies: + "@types/body-parser" "*" + "@types/express-serve-static-core" "^5.0.0" + "@types/serve-static" "*" + "@types/graceful-fs@^4.1.3": version "4.1.9" resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.9.tgz#2a06bc0f68a20ab37b3e36aa238be6abdf49e8b4" @@ -715,6 +751,11 @@ dependencies: "@types/node" "*" +"@types/http-errors@*": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@types/http-errors/-/http-errors-2.0.5.tgz#5b749ab2b16ba113423feb1a64a95dcd30398472" + integrity sha512-r8Tayk8HJnX0FztbZN7oVqGccWgw98T/0neJphO91KkmOzug1KkofZURD4UaD5uH8AqcFLfdPErnBod0u71/qg== + "@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1": version "2.0.6" resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz#7739c232a1fee9b4d3ce8985f314c0c6d33549d7" @@ -742,6 +783,11 @@ expect "^29.0.0" pretty-format "^29.0.0" +"@types/mime@^1": + version "1.3.5" + resolved "https://registry.yarnpkg.com/@types/mime/-/mime-1.3.5.tgz#1ef302e01cf7d2b5a0fa526790c9123bf1d06690" + integrity sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w== + "@types/node@*": version "22.15.17" resolved "https://registry.yarnpkg.com/@types/node/-/node-22.15.17.tgz#355ccec95f705b664e4332bb64a7f07db30b7055" @@ -749,6 +795,33 @@ dependencies: undici-types "~6.21.0" +"@types/qs@*": + version "6.14.0" + resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.14.0.tgz#d8b60cecf62f2db0fb68e5e006077b9178b85de5" + integrity sha512-eOunJqu0K1923aExK6y8p6fsihYEn/BYuQ4g0CxAAgFc4b/ZLN4CrsRZ55srTdqoiLzU2B2evC+apEIxprEzkQ== + +"@types/range-parser@*": + version "1.2.7" + resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.7.tgz#50ae4353eaaddc04044279812f52c8c65857dbcb" + integrity sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ== + +"@types/send@*": + version "0.17.5" + resolved "https://registry.yarnpkg.com/@types/send/-/send-0.17.5.tgz#d991d4f2b16f2b1ef497131f00a9114290791e74" + integrity sha512-z6F2D3cOStZvuk2SaP6YrwkNO65iTZcwA2ZkSABegdkAh/lf+Aa/YQndZVfmEXT5vgAp6zv06VQ3ejSVjAny4w== + dependencies: + "@types/mime" "^1" + "@types/node" "*" + +"@types/serve-static@*": + version "1.15.8" + resolved "https://registry.yarnpkg.com/@types/serve-static/-/serve-static-1.15.8.tgz#8180c3fbe4a70e8f00b9f70b9ba7f08f35987877" + integrity sha512-roei0UY3LhpOJvjbIP6ZZFngyLKl5dskOtDhxY5THRSpO+ZI+nzJ+m5yUMzGrp89YRa7lvknKkMYjqQFGwA7Sg== + dependencies: + "@types/http-errors" "*" + "@types/node" "*" + "@types/send" "*" + "@types/stack-utils@^2.0.0": version "2.0.3" resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.3.tgz#6209321eb2c1712a7e7466422b8cb1fc0d9dd5d8" @@ -885,7 +958,7 @@ aggregate-error@^3.0.0: clean-stack "^2.0.0" indent-string "^4.0.0" -ajv@^6.12.4: +ajv@^6.12.4, ajv@^6.12.6: version "6.12.6" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== @@ -1246,7 +1319,7 @@ create-require@^1.1.0: resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== -cross-spawn@^7.0.2, cross-spawn@^7.0.3: +cross-spawn@^7.0.2, cross-spawn@^7.0.3, cross-spawn@^7.0.5: version "7.0.6" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f" integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA== @@ -1514,6 +1587,11 @@ etag@^1.8.1: resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" integrity sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg== +eventsource-parser@^3.0.0: + version "3.0.3" + resolved "https://registry.yarnpkg.com/eventsource-parser/-/eventsource-parser-3.0.3.tgz#e9af1d40b77e6268cdcbc767321e8b9f066adea8" + integrity sha512-nVpZkTMM9rF6AQ9gPJpFsNAMt48wIzB5TQgiTLdHiuO8XEDhUgZEhqKlZWXbIzo9VmJ/HvysHqEaVeD5v9TPvA== + eventsource-parser@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/eventsource-parser/-/eventsource-parser-3.0.1.tgz#5e358dba9a55ba64ca90da883c4ca35bd82467bd" @@ -1562,7 +1640,7 @@ express-rate-limit@^7.5.0: resolved "https://registry.yarnpkg.com/express-rate-limit/-/express-rate-limit-7.5.0.tgz#6a67990a724b4fbbc69119419feef50c51e8b28f" integrity sha512-eB5zbQh5h+VenMPM3fh+nw1YExi5nMr6HUCR62ELSP11huvxm/Uir1H1QEyTkk5QX6A58pX6NmaTMceKZ0Eodg== -express@^5.0.1: +express@^5.0.1, express@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/express/-/express-5.1.0.tgz#d31beaf715a0016f0d53f47d3b4d7acf28c75cc9" integrity sha512-DT9ck5YIRU+8GYzzU5kT3eHGA5iL+1Zd0EutOmTE9Dtk+Tvuzd23VBU+ec7HPNSTxXYO55gPV/hq4pSBJDjFpA== @@ -2404,6 +2482,10 @@ jest@^29.4.0: import-local "^3.0.2" jest-cli "^29.7.0" +"jq-web@https://github.com/stainless-api/jq-web/releases/download/v0.8.6/jq-web.tar.gz": + version "0.8.6" + resolved "https://github.com/stainless-api/jq-web/releases/download/v0.8.6/jq-web.tar.gz#14d0e126987736e82e964d675c3838b5944faa6f" + js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" @@ -3305,9 +3387,9 @@ ts-node@^10.5.0: v8-compile-cache-lib "^3.0.1" yn "3.1.1" -"tsc-multi@https://github.com/stainless-api/tsc-multi/releases/download/v1.1.7/tsc-multi.tgz": - version "1.1.7" - resolved "https://github.com/stainless-api/tsc-multi/releases/download/v1.1.7/tsc-multi.tgz#52f40adf8b808bd0b633346d11cc4a8aeea465cd" +"tsc-multi@https://github.com/stainless-api/tsc-multi/releases/download/v1.1.8/tsc-multi.tgz": + version "1.1.8" + resolved "https://github.com/stainless-api/tsc-multi/releases/download/v1.1.8/tsc-multi.tgz#f544b359b8f05e607771ffacc280e58201476b04" dependencies: debug "^4.3.7" fast-glob "^3.3.2" @@ -3508,7 +3590,17 @@ zod-to-json-schema@^3.24.1, zod-to-json-schema@^3.24.5: resolved "https://registry.yarnpkg.com/zod-to-json-schema/-/zod-to-json-schema-3.24.5.tgz#d1095440b147fb7c2093812a53c54df8d5df50a3" integrity sha512-/AuWwMP+YqiPbsJx5D6TfgRTc4kTLjsh5SOcd4bLsfUg2RcEXrFMJl1DGgdHy2aCfsIA/cr/1JM0xcB2GZji8g== -zod@^3.23.8, zod@^3.24.4: +zod-validation-error@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/zod-validation-error/-/zod-validation-error-4.0.1.tgz#a105723eb40299578a6a38cb86647068f6d005b1" + integrity sha512-F3rdaCOHs5ViJ5YTz5zzRtfkQdMdIeKudJAoxy7yB/2ZMEHw73lmCAcQw11r7++20MyGl4WV59EVh7A9rNAyog== + +zod@^3.23.8: version "3.24.4" resolved "https://registry.yarnpkg.com/zod/-/zod-3.24.4.tgz#e2e2cca5faaa012d76e527d0d36622e0a90c315f" integrity sha512-OdqJE9UDRPwWsrHjLN2F8bPxvwJBK22EHLWtanu0LSYr5YqzsaaW3RMgmjwr8Rypg5k+meEJdSPXJZXE/yqOMg== + +zod@^3.25.20: + version "3.25.76" + resolved "https://registry.yarnpkg.com/zod/-/zod-3.25.76.tgz#26841c3f6fd22a6a2760e7ccb719179768471e34" + integrity sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ== From fd2fa21ceeef064b14d4db7282d0927170ec6103 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 19 Aug 2025 02:13:10 +0000 Subject: [PATCH 17/89] chore(internal): refactor array check --- packages/mcp-server/src/headers.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/mcp-server/src/headers.ts b/packages/mcp-server/src/headers.ts index 0fe02064..31d551b5 100644 --- a/packages/mcp-server/src/headers.ts +++ b/packages/mcp-server/src/headers.ts @@ -17,7 +17,7 @@ export const parseAuthHeaders = (req: IncomingMessage): Partial = } const apiKey = - req.headers['x-julep-api-key'] instanceof Array ? + Array.isArray(req.headers['x-julep-api-key']) ? req.headers['x-julep-api-key'][0] : req.headers['x-julep-api-key']; return { apiKey }; From cc312bcae0e89e1d92eb515ec80fc761d5e91729 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 20 Aug 2025 03:18:32 +0000 Subject: [PATCH 18/89] chore(mcp): add cors to oauth metadata route --- packages/mcp-server/package.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/mcp-server/package.json b/packages/mcp-server/package.json index 869be3ba..0d842853 100644 --- a/packages/mcp-server/package.json +++ b/packages/mcp-server/package.json @@ -30,6 +30,7 @@ "@julep/sdk": "file:../../dist/", "@cloudflare/cabidela": "^0.2.4", "@modelcontextprotocol/sdk": "^1.11.5", + "cors": "^2.8.5", "express": "^5.1.0", "jq-web": "https://github.com/stainless-api/jq-web/releases/download/v0.8.6/jq-web.tar.gz", "qs": "^6.14.0", @@ -42,6 +43,7 @@ "mcp-server": "dist/index.js" }, "devDependencies": { + "@types/cors": "^2.8.19", "@types/express": "^5.0.3", "@types/jest": "^29.4.0", "@types/yargs": "^17.0.8", From 1e00ca0f773fc45220972ee123ad198f06f95604 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 20 Aug 2025 03:20:41 +0000 Subject: [PATCH 19/89] feat(mcp): add code execution tool --- packages/mcp-server/package.json | 3 +- packages/mcp-server/src/code-tool-paths.cts | 3 + packages/mcp-server/src/code-tool-types.ts | 14 ++ packages/mcp-server/src/code-tool-worker.ts | 46 ++++++ packages/mcp-server/src/code-tool.ts | 146 ++++++++++++++++++++ packages/mcp-server/src/options.ts | 18 ++- packages/mcp-server/src/server.ts | 3 + 7 files changed, 226 insertions(+), 7 deletions(-) create mode 100644 packages/mcp-server/src/code-tool-paths.cts create mode 100644 packages/mcp-server/src/code-tool-types.ts create mode 100644 packages/mcp-server/src/code-tool-worker.ts create mode 100644 packages/mcp-server/src/code-tool.ts diff --git a/packages/mcp-server/package.json b/packages/mcp-server/package.json index 0d842853..c07127b9 100644 --- a/packages/mcp-server/package.json +++ b/packages/mcp-server/package.json @@ -30,6 +30,7 @@ "@julep/sdk": "file:../../dist/", "@cloudflare/cabidela": "^0.2.4", "@modelcontextprotocol/sdk": "^1.11.5", + "@valtown/deno-http-worker": "^0.0.21", "cors": "^2.8.5", "express": "^5.1.0", "jq-web": "https://github.com/stainless-api/jq-web/releases/download/v0.8.6/jq-web.tar.gz", @@ -57,7 +58,7 @@ "ts-jest": "^29.1.0", "ts-morph": "^19.0.0", "ts-node": "^10.5.0", - "tsc-multi": "https://github.com/stainless-api/tsc-multi/releases/download/v1.1.8/tsc-multi.tgz", + "tsc-multi": "https://github.com/stainless-api/tsc-multi/releases/download/v1.1.9/tsc-multi.tgz", "tsconfig-paths": "^4.0.0", "typescript": "5.8.3" }, diff --git a/packages/mcp-server/src/code-tool-paths.cts b/packages/mcp-server/src/code-tool-paths.cts new file mode 100644 index 00000000..3d6655af --- /dev/null +++ b/packages/mcp-server/src/code-tool-paths.cts @@ -0,0 +1,3 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +export const workerPath = require.resolve('./code-tool-worker.mjs') diff --git a/packages/mcp-server/src/code-tool-types.ts b/packages/mcp-server/src/code-tool-types.ts new file mode 100644 index 00000000..7f348389 --- /dev/null +++ b/packages/mcp-server/src/code-tool-types.ts @@ -0,0 +1,14 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import { type ClientOptions } from '@julep/sdk/index'; + +export type WorkerInput = { + opts: ClientOptions; + code: string; +}; +export type WorkerSuccess = { + result: unknown | null; + logLines: string[]; + errLines: string[]; +}; +export type WorkerError = { message: string | undefined }; diff --git a/packages/mcp-server/src/code-tool-worker.ts b/packages/mcp-server/src/code-tool-worker.ts new file mode 100644 index 00000000..89a58126 --- /dev/null +++ b/packages/mcp-server/src/code-tool-worker.ts @@ -0,0 +1,46 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import util from 'node:util'; +import { WorkerInput, WorkerSuccess, WorkerError } from './code-tool-types'; +import { Julep } from '@julep/sdk'; + +const fetch = async (req: Request): Promise => { + const { opts, code } = (await req.json()) as WorkerInput; + const client = new Julep({ + ...opts, + }); + + const logLines: string[] = []; + const errLines: string[] = []; + const console = { + log: (...args: unknown[]) => { + logLines.push(util.format(...args)); + }, + error: (...args: unknown[]) => { + errLines.push(util.format(...args)); + }, + }; + try { + let run_ = async (client: any) => {}; + eval(` + ${code} + run_ = run; + `); + const result = await run_(client); + return Response.json({ + result, + logLines, + errLines, + } satisfies WorkerSuccess); + } catch (e) { + const message = e instanceof Error ? e.message : undefined; + return Response.json( + { + message, + } satisfies WorkerError, + { status: 400, statusText: 'Code execution error' }, + ); + } +}; + +export default { fetch }; diff --git a/packages/mcp-server/src/code-tool.ts b/packages/mcp-server/src/code-tool.ts new file mode 100644 index 00000000..574e2d35 --- /dev/null +++ b/packages/mcp-server/src/code-tool.ts @@ -0,0 +1,146 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import { type ClientOptions } from '@julep/sdk/index'; + +import { dirname } from 'node:path'; +import { pathToFileURL } from 'node:url'; +import Julep from '@julep/sdk'; +import { Endpoint, ContentBlock, Metadata } from './tools/types'; + +import { Tool } from '@modelcontextprotocol/sdk/types.js'; + +import { newDenoHTTPWorker } from '@valtown/deno-http-worker'; +import { WorkerInput, WorkerError, WorkerSuccess } from './code-tool-types'; +import { workerPath } from './code-tool-paths.cjs'; + +/** + * A tool that runs code against a copy of the SDK. + * + * Instead of exposing every endpoint as it's own tool, which uses up too many tokens for LLMs to use at once, + * we expose a single tool that can be used to search for endpoints by name, resource, operation, or tag, and then + * a generic endpoint that can be used to invoke any endpoint with the provided arguments. + * + * @param endpoints - The endpoints to include in the list. + */ +export function codeTool(): Endpoint { + const metadata: Metadata = { resource: 'all', operation: 'write', tags: [] }; + const tool: Tool = { + name: 'execute', + description: + 'Runs Typescript code to interact with the API.\nYou are a skilled programmer writing code to interface with the service.\nDefine an async function named "run" that takes a single parameter of an initialized client, and it will be run.\nDo not initialize a client, but instead use the client that you are given as a parameter.\nYou will be returned anything that your function returns, plus the results of any console.log statements.\nIf any code triggers an error, the tool will return an error response, so you do not need to add error handling unless you want to output something more helpful than the raw error.\nIt is not necessary to add comments to code, unless by adding those comments you believe that you can generate better code.\nThis code will run in a container, and you will not be able to use fetch or otherwise interact with the network calls other than through the client you are given.\nAny variables you define won\'t live between successive uses of this call, so make sure to return or log any data you might need later.', + inputSchema: { type: 'object', properties: { code: { type: 'string' } } }, + }; + + const handler = async (client: Julep, args: unknown) => { + const baseURLHostname = new URL(client.baseURL).hostname; + const { code } = args as { code: string }; + + const worker = await newDenoHTTPWorker(pathToFileURL(workerPath), { + runFlags: [ + `--node-modules-dir=manual`, + `--allow-read=code-tool-worker.mjs,${workerPath.replace(/([\/\\]node_modules)[\/\\].+$/, '$1')}/`, + `--allow-net=${baseURLHostname}`, + // Allow environment variables because instantiating the client will try to read from them, + // even though they are not set. + '--allow-env', + ], + printOutput: true, + spawnOptions: { + cwd: dirname(workerPath), + }, + }); + + try { + const resp = await new Promise((resolve, reject) => { + worker.addEventListener('exit', (exitCode) => { + reject(new Error(`Worker exited with code ${exitCode}`)); + }); + + const opts: ClientOptions = { + baseURL: client.baseURL, + apiKey: client.apiKey, + defaultHeaders: { + 'X-Stainless-MCP': 'true', + }, + }; + + const req = worker.request( + 'http://localhost', + { + headers: { + 'content-type': 'application/json', + }, + method: 'POST', + }, + (resp) => { + const body: Uint8Array[] = []; + resp.on('error', (err) => { + reject(err); + }); + resp.on('data', (chunk) => { + body.push(chunk); + }); + resp.on('end', () => { + resolve( + new Response(Buffer.concat(body).toString(), { + status: resp.statusCode ?? 200, + headers: resp.headers as any, + }), + ); + }); + }, + ); + + const body = JSON.stringify({ + opts, + code, + } satisfies WorkerInput); + + req.write(body, (err) => { + if (err !== null && err !== undefined) { + reject(err); + } + }); + + req.end(); + }); + + if (resp.status === 200) { + const { result, logLines, errLines } = (await resp.json()) as WorkerSuccess; + const returnOutput: ContentBlock | null = + result === null ? null + : result === undefined ? null + : { + type: 'text', + text: typeof result === 'string' ? (result as string) : JSON.stringify(result), + }; + const logOutput: ContentBlock | null = + logLines.length === 0 ? + null + : { + type: 'text', + text: logLines.join('\n'), + }; + const errOutput: ContentBlock | null = + errLines.length === 0 ? + null + : { + type: 'text', + text: 'Error output:\n' + errLines.join('\n'), + }; + return { + content: [returnOutput, logOutput, errOutput].filter((block) => block !== null), + }; + } else { + const { message } = (await resp.json()) as WorkerError; + throw new Error(message); + } + } catch (e) { + throw e; + } finally { + worker.terminate(); + } + }; + + return { metadata, tool, handler }; +} diff --git a/packages/mcp-server/src/options.ts b/packages/mcp-server/src/options.ts index 0768d931..a1745912 100644 --- a/packages/mcp-server/src/options.ts +++ b/packages/mcp-server/src/options.ts @@ -16,6 +16,7 @@ export type McpOptions = { client: ClientType | undefined; includeDynamicTools: boolean | undefined; includeAllTools: boolean | undefined; + includeCodeTools: boolean | undefined; filters: Filter[]; capabilities?: Partial; }; @@ -54,13 +55,13 @@ export function parseCLIOptions(): CLIOptions { .option('tools', { type: 'string', array: true, - choices: ['dynamic', 'all'], + choices: ['dynamic', 'all', 'code'], description: 'Use dynamic tools or all tools', }) .option('no-tools', { type: 'string', array: true, - choices: ['dynamic', 'all'], + choices: ['dynamic', 'all', 'code'], description: 'Do not use any dynamic or all tools', }) .option('tool', { @@ -251,11 +252,13 @@ export function parseCLIOptions(): CLIOptions { } } + const shouldIncludeToolType = (toolType: 'dynamic' | 'all' | 'code') => + explicitTools ? argv.tools?.includes(toolType) && !argv.noTools?.includes(toolType) : undefined; + const explicitTools = Boolean(argv.tools || argv.noTools); - const includeDynamicTools = - explicitTools ? argv.tools?.includes('dynamic') && !argv.noTools?.includes('dynamic') : undefined; - const includeAllTools = - explicitTools ? argv.tools?.includes('all') && !argv.noTools?.includes('all') : undefined; + const includeDynamicTools = shouldIncludeToolType('dynamic'); + const includeAllTools = shouldIncludeToolType('all'); + const includeCodeTools = shouldIncludeToolType('code'); const transport = argv.transport as 'stdio' | 'http'; @@ -264,6 +267,7 @@ export function parseCLIOptions(): CLIOptions { client: client && knownClients[client] ? client : undefined, includeDynamicTools, includeAllTools, + includeCodeTools, filters, capabilities: clientCapabilities, list: argv.list || false, @@ -385,6 +389,8 @@ export function parseQueryOptions(defaultOptions: McpOptions, query: unknown): M includeAllTools: defaultOptions.includeAllTools ?? (queryOptions.tools?.includes('all') && !queryOptions.no_tools?.includes('all')), + // Never include code tools on remote server. + includeCodeTools: undefined, filters, capabilities: clientCapabilities, }; diff --git a/packages/mcp-server/src/server.ts b/packages/mcp-server/src/server.ts index f793920f..cacaa11b 100644 --- a/packages/mcp-server/src/server.ts +++ b/packages/mcp-server/src/server.ts @@ -14,6 +14,7 @@ import { parseEmbeddedJSON, } from './compat'; import { dynamicTools } from './dynamic-tools'; +import { codeTool } from './code-tool'; import { McpOptions } from './options'; export { McpOptions } from './options'; @@ -105,6 +106,8 @@ export function selectTools(endpoints: Endpoint[], options: McpOptions): Endpoin includedTools = endpoints; } else if (options.includeDynamicTools) { includedTools = dynamicTools(endpoints); + } else if (options.includeCodeTools) { + includedTools = [codeTool()]; } else { includedTools = endpoints; } From a80dd722b30a9f2448d873dd63084daa3377ebdc Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 21 Aug 2025 02:57:14 +0000 Subject: [PATCH 20/89] chore(internal): make mcp-server publishing public by defaut --- packages/mcp-server/package.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/mcp-server/package.json b/packages/mcp-server/package.json index c07127b9..48622a08 100644 --- a/packages/mcp-server/package.json +++ b/packages/mcp-server/package.json @@ -15,6 +15,9 @@ "license": "Apache-2.0", "packageManager": "yarn@1.22.22", "private": false, + "publishConfig": { + "access": "public" + }, "scripts": { "test": "jest", "build": "bash ./build", From 2d55b8db6791b4780ab33d6bc3beb3e168f4640d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 21 Aug 2025 03:04:25 +0000 Subject: [PATCH 21/89] feat(mcp): add option to infer mcp client --- packages/mcp-server/src/compat.ts | 4 +- packages/mcp-server/src/http.ts | 7 +- packages/mcp-server/src/index.ts | 4 +- packages/mcp-server/src/options.ts | 46 +++++------- packages/mcp-server/src/server.ts | 88 +++++++++++++---------- packages/mcp-server/src/stdio.ts | 7 +- packages/mcp-server/tests/options.test.ts | 25 +------ 7 files changed, 78 insertions(+), 103 deletions(-) diff --git a/packages/mcp-server/src/compat.ts b/packages/mcp-server/src/compat.ts index 1df7a7aa..f84053c7 100644 --- a/packages/mcp-server/src/compat.ts +++ b/packages/mcp-server/src/compat.ts @@ -20,13 +20,13 @@ export const defaultClientCapabilities: ClientCapabilities = { toolNameLength: undefined, }; -export const ClientType = z.enum(['openai-agents', 'claude', 'claude-code', 'cursor']); +export const ClientType = z.enum(['openai-agents', 'claude', 'claude-code', 'cursor', 'infer']); export type ClientType = z.infer; // Client presets for compatibility // Note that these could change over time as models get better, so this is // a best effort. -export const knownClients: Record = { +export const knownClients: Record, ClientCapabilities> = { 'openai-agents': { topLevelUnions: false, validJson: true, diff --git a/packages/mcp-server/src/http.ts b/packages/mcp-server/src/http.ts index ca6d3d25..c11185b7 100644 --- a/packages/mcp-server/src/http.ts +++ b/packages/mcp-server/src/http.ts @@ -8,7 +8,6 @@ import { fromError } from 'zod-validation-error/v3'; import { McpOptions, parseQueryOptions } from './options'; import { initMcpServer, newMcpServer } from './server'; import { parseAuthHeaders } from './headers'; -import { Endpoint } from './tools'; const newServer = ( defaultMcpOptions: McpOptions, @@ -101,11 +100,7 @@ export const streamableHTTPApp = (options: McpOptions): express.Express => { return app; }; -export const launchStreamableHTTPServer = async ( - options: McpOptions, - endpoints: Endpoint[], - port: number | string | undefined, -) => { +export const launchStreamableHTTPServer = async (options: McpOptions, port: number | string | undefined) => { const app = streamableHTTPApp(options); const server = app.listen(port); const address = server.address(); diff --git a/packages/mcp-server/src/index.ts b/packages/mcp-server/src/index.ts index 05b2ba63..c450e4bb 100644 --- a/packages/mcp-server/src/index.ts +++ b/packages/mcp-server/src/index.ts @@ -23,10 +23,10 @@ async function main() { switch (options.transport) { case 'stdio': - await launchStdioServer(options, selectedTools); + await launchStdioServer(options); break; case 'http': - await launchStreamableHTTPServer(options, selectedTools, options.port ?? options.socket); + await launchStreamableHTTPServer(options, options.port ?? options.socket); break; } } diff --git a/packages/mcp-server/src/options.ts b/packages/mcp-server/src/options.ts index a1745912..9eb00b48 100644 --- a/packages/mcp-server/src/options.ts +++ b/packages/mcp-server/src/options.ts @@ -13,12 +13,12 @@ export type CLIOptions = McpOptions & { }; export type McpOptions = { - client: ClientType | undefined; - includeDynamicTools: boolean | undefined; - includeAllTools: boolean | undefined; - includeCodeTools: boolean | undefined; - filters: Filter[]; - capabilities?: Partial; + client?: ClientType | undefined; + includeDynamicTools?: boolean | undefined; + includeAllTools?: boolean | undefined; + includeCodeTools?: boolean | undefined; + filters?: Filter[] | undefined; + capabilities?: Partial | undefined; }; const CAPABILITY_CHOICES = [ @@ -204,14 +204,7 @@ export function parseCLIOptions(): CLIOptions { } // Parse client capabilities - const clientCapabilities: ClientCapabilities = { - topLevelUnions: true, - validJson: true, - refs: true, - unions: true, - formats: true, - toolNameLength: undefined, - }; + const clientCapabilities: Partial = {}; // Apply individual capability overrides if (Array.isArray(argv.capability)) { @@ -264,7 +257,7 @@ export function parseCLIOptions(): CLIOptions { const client = argv.client as ClientType; return { - client: client && knownClients[client] ? client : undefined, + client: client && client !== 'infer' && knownClients[client] ? client : undefined, includeDynamicTools, includeAllTools, includeCodeTools, @@ -310,7 +303,7 @@ export function parseQueryOptions(defaultOptions: McpOptions, query: unknown): M const queryObject = typeof query === 'string' ? qs.parse(query) : query; const queryOptions = QueryOptions.parse(queryObject); - const filters: Filter[] = [...defaultOptions.filters]; + const filters: Filter[] = [...(defaultOptions.filters ?? [])]; for (const resource of queryOptions.resource || []) { filters.push({ type: 'resource', op: 'include', value: resource }); @@ -338,15 +331,7 @@ export function parseQueryOptions(defaultOptions: McpOptions, query: unknown): M } // Parse client capabilities - const clientCapabilities: ClientCapabilities = { - topLevelUnions: true, - validJson: true, - refs: true, - unions: true, - formats: true, - toolNameLength: undefined, - ...defaultOptions.capabilities, - }; + const clientCapabilities: Partial = { ...defaultOptions.capabilities }; for (const cap of queryOptions.capability || []) { const parsed = parseCapabilityValue(cap); @@ -384,12 +369,13 @@ export function parseQueryOptions(defaultOptions: McpOptions, query: unknown): M return { client: queryOptions.client ?? defaultOptions.client, includeDynamicTools: - defaultOptions.includeDynamicTools ?? - (queryOptions.tools?.includes('dynamic') && !queryOptions.no_tools?.includes('dynamic')), + defaultOptions.includeDynamicTools === false ? + false + : queryOptions.tools?.includes('dynamic') && !queryOptions.no_tools?.includes('dynamic'), includeAllTools: - defaultOptions.includeAllTools ?? - (queryOptions.tools?.includes('all') && !queryOptions.no_tools?.includes('all')), - // Never include code tools on remote server. + defaultOptions.includeAllTools === false ? + false + : queryOptions.tools?.includes('all') && !queryOptions.no_tools?.includes('all'), includeCodeTools: undefined, filters, capabilities: clientCapabilities, diff --git a/packages/mcp-server/src/server.ts b/packages/mcp-server/src/server.ts index cacaa11b..d7539a03 100644 --- a/packages/mcp-server/src/server.ts +++ b/packages/mcp-server/src/server.ts @@ -3,7 +3,12 @@ import { Server } from '@modelcontextprotocol/sdk/server/index.js'; import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'; import { Endpoint, endpoints, HandlerFunction, query } from './tools'; -import { CallToolRequestSchema, ListToolsRequestSchema, Tool } from '@modelcontextprotocol/sdk/types.js'; +import { + CallToolRequestSchema, + Implementation, + ListToolsRequestSchema, + Tool, +} from '@modelcontextprotocol/sdk/types.js'; import { ClientOptions } from '@julep/sdk'; import Julep from '@julep/sdk'; import { @@ -41,79 +46,88 @@ export const server = newMcpServer(); */ export function initMcpServer(params: { server: Server | McpServer; - clientOptions: ClientOptions; - mcpOptions: McpOptions; - endpoints?: { tool: Tool; handler: HandlerFunction }[]; -}) { - const transformedEndpoints = selectTools(endpoints, params.mcpOptions); - const client = new Julep(params.clientOptions); - const capabilities = { - ...defaultClientCapabilities, - ...(params.mcpOptions.client ? knownClients[params.mcpOptions.client] : params.mcpOptions.capabilities), - }; - init({ server: params.server, client, endpoints: transformedEndpoints, capabilities }); -} - -export function init(params: { - server: Server | McpServer; - client?: Julep; - endpoints?: { tool: Tool; handler: HandlerFunction }[]; - capabilities?: Partial; + clientOptions?: ClientOptions; + mcpOptions?: McpOptions; }) { const server = params.server instanceof McpServer ? params.server.server : params.server; - const providedEndpoints = params.endpoints || endpoints; + const mcpOptions = params.mcpOptions ?? {}; + + let providedEndpoints: Endpoint[] | null = null; + let endpointMap: Record | null = null; + + const initTools = (implementation?: Implementation) => { + if (implementation && (!mcpOptions.client || mcpOptions.client === 'infer')) { + mcpOptions.client = + implementation.name.toLowerCase().includes('claude') ? 'claude' + : implementation.name.toLowerCase().includes('cursor') ? 'cursor' + : undefined; + mcpOptions.capabilities = { + ...(mcpOptions.client && knownClients[mcpOptions.client]), + ...mcpOptions.capabilities, + }; + } + providedEndpoints = selectTools(endpoints, mcpOptions); + endpointMap = Object.fromEntries(providedEndpoints.map((endpoint) => [endpoint.tool.name, endpoint])); + }; - const endpointMap = Object.fromEntries(providedEndpoints.map((endpoint) => [endpoint.tool.name, endpoint])); + const client = new Julep({ + ...{ environment: (readEnv('JULEP_ENVIRONMENT') || undefined) as any }, - const client = - params.client || - new Julep({ - environment: (readEnv('JULEP_ENVIRONMENT') || undefined) as any, - defaultHeaders: { 'X-Stainless-MCP': 'true' }, - }); + ...params.clientOptions, + defaultHeaders: { + ...params.clientOptions?.defaultHeaders, + 'X-Stainless-MCP': 'true', + }, + }); server.setRequestHandler(ListToolsRequestSchema, async () => { + if (providedEndpoints === null) { + initTools(server.getClientVersion()); + } return { - tools: providedEndpoints.map((endpoint) => endpoint.tool), + tools: providedEndpoints!.map((endpoint) => endpoint.tool), }; }); server.setRequestHandler(CallToolRequestSchema, async (request) => { + if (endpointMap === null) { + initTools(server.getClientVersion()); + } const { name, arguments: args } = request.params; - const endpoint = endpointMap[name]; + const endpoint = endpointMap![name]; if (!endpoint) { throw new Error(`Unknown tool: ${name}`); } - return executeHandler(endpoint.tool, endpoint.handler, client, args, params.capabilities); + return executeHandler(endpoint.tool, endpoint.handler, client, args, mcpOptions.capabilities); }); } /** * Selects the tools to include in the MCP Server based on the provided options. */ -export function selectTools(endpoints: Endpoint[], options: McpOptions): Endpoint[] { - const filteredEndpoints = query(options.filters, endpoints); +export function selectTools(endpoints: Endpoint[], options?: McpOptions): Endpoint[] { + const filteredEndpoints = query(options?.filters ?? [], endpoints); let includedTools = filteredEndpoints; if (includedTools.length > 0) { - if (options.includeDynamicTools) { + if (options?.includeDynamicTools) { includedTools = dynamicTools(includedTools); } } else { - if (options.includeAllTools) { + if (options?.includeAllTools) { includedTools = endpoints; - } else if (options.includeDynamicTools) { + } else if (options?.includeDynamicTools) { includedTools = dynamicTools(endpoints); - } else if (options.includeCodeTools) { + } else if (options?.includeCodeTools) { includedTools = [codeTool()]; } else { includedTools = endpoints; } } - const capabilities = { ...defaultClientCapabilities, ...options.capabilities }; + const capabilities = { ...defaultClientCapabilities, ...options?.capabilities }; return applyCompatibilityTransformations(includedTools, capabilities); } diff --git a/packages/mcp-server/src/stdio.ts b/packages/mcp-server/src/stdio.ts index b2691635..d902a5bb 100644 --- a/packages/mcp-server/src/stdio.ts +++ b/packages/mcp-server/src/stdio.ts @@ -1,12 +1,11 @@ import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'; -import { init, newMcpServer } from './server'; -import { Endpoint } from './tools'; +import { initMcpServer, newMcpServer } from './server'; import { McpOptions } from './options'; -export const launchStdioServer = async (options: McpOptions, endpoints: Endpoint[]) => { +export const launchStdioServer = async (options: McpOptions) => { const server = newMcpServer(); - init({ server, endpoints }); + initMcpServer({ server, mcpOptions: options }); const transport = new StdioServerTransport(); await server.connect(transport); diff --git a/packages/mcp-server/tests/options.test.ts b/packages/mcp-server/tests/options.test.ts index 08ea1f18..24604b84 100644 --- a/packages/mcp-server/tests/options.test.ts +++ b/packages/mcp-server/tests/options.test.ts @@ -29,15 +29,7 @@ describe('parseCLIOptions', () => { { type: 'operation', op: 'include', value: 'read' }, ] as Filter[]); - // Default client capabilities - expect(result.capabilities).toEqual({ - topLevelUnions: true, - validJson: true, - refs: true, - unions: true, - formats: true, - toolNameLength: undefined, - }); + expect(result.capabilities).toEqual({}); expect(result.list).toBe(false); @@ -61,14 +53,7 @@ describe('parseCLIOptions', () => { { type: 'operation', op: 'exclude', value: 'write' }, ] as Filter[]); - expect(result.capabilities).toEqual({ - topLevelUnions: true, - validJson: true, - refs: true, - unions: true, - formats: true, - toolNameLength: undefined, - }); + expect(result.capabilities).toEqual({}); cleanup(); }); @@ -99,7 +84,6 @@ describe('parseCLIOptions', () => { validJson: true, refs: true, unions: true, - formats: true, toolNameLength: 40, }); @@ -150,10 +134,7 @@ describe('parseCLIOptions', () => { expect(result.capabilities).toEqual({ topLevelUnions: true, validJson: true, - refs: true, unions: true, - formats: true, - toolNameLength: undefined, }); cleanup(); @@ -316,7 +297,7 @@ describe('parseQueryOptions', () => { ]); expect(result.client).toBe('cursor'); - expect(result.includeDynamicTools).toBe(true); + expect(result.includeDynamicTools).toBe(undefined); }); it('should override client from default options', () => { From 0d2ee4b3982034605a315adfdc2aecc6a6fbc5bd Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 22 Aug 2025 03:03:49 +0000 Subject: [PATCH 22/89] chore(mcp): update package.json --- packages/mcp-server/package.json | 1 + packages/mcp-server/src/headers.ts | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/mcp-server/package.json b/packages/mcp-server/package.json index 48622a08..d6d934bb 100644 --- a/packages/mcp-server/package.json +++ b/packages/mcp-server/package.json @@ -50,6 +50,7 @@ "@types/cors": "^2.8.19", "@types/express": "^5.0.3", "@types/jest": "^29.4.0", + "@types/qs": "^6.14.0", "@types/yargs": "^17.0.8", "@typescript-eslint/eslint-plugin": "8.31.1", "@typescript-eslint/parser": "8.31.1", diff --git a/packages/mcp-server/src/headers.ts b/packages/mcp-server/src/headers.ts index 31d551b5..bde32b14 100644 --- a/packages/mcp-server/src/headers.ts +++ b/packages/mcp-server/src/headers.ts @@ -1,8 +1,7 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { type ClientOptions } from '@julep/sdk/index'; - import { IncomingMessage } from 'node:http'; +import { ClientOptions } from '@julep/sdk'; export const parseAuthHeaders = (req: IncomingMessage): Partial => { if (req.headers.authorization) { From 6b6f77c4742e866839b0edb290422f61c96e44c2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 22 Aug 2025 03:04:41 +0000 Subject: [PATCH 23/89] chore(mcp): update types --- packages/mcp-server/src/code-tool-types.ts | 2 +- packages/mcp-server/src/code-tool.ts | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/mcp-server/src/code-tool-types.ts b/packages/mcp-server/src/code-tool-types.ts index 7f348389..cfcb678c 100644 --- a/packages/mcp-server/src/code-tool-types.ts +++ b/packages/mcp-server/src/code-tool-types.ts @@ -1,6 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { type ClientOptions } from '@julep/sdk/index'; +import { ClientOptions } from '@julep/sdk'; export type WorkerInput = { opts: ClientOptions; diff --git a/packages/mcp-server/src/code-tool.ts b/packages/mcp-server/src/code-tool.ts index 574e2d35..f2fed026 100644 --- a/packages/mcp-server/src/code-tool.ts +++ b/packages/mcp-server/src/code-tool.ts @@ -1,10 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { type ClientOptions } from '@julep/sdk/index'; - import { dirname } from 'node:path'; import { pathToFileURL } from 'node:url'; -import Julep from '@julep/sdk'; +import Julep, { ClientOptions } from '@julep/sdk'; import { Endpoint, ContentBlock, Metadata } from './tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; From eb0d8650804d09b5a0ffe4561250b1e82eaf979d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 23 Aug 2025 02:39:16 +0000 Subject: [PATCH 24/89] chore: update CI script --- .github/workflows/ci.yml | 9 +++++++++ scripts/utils/upload-artifact.sh | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5aba00bb..64315aa0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -68,6 +68,15 @@ jobs: AUTH: ${{ steps.github-oidc.outputs.github_token }} SHA: ${{ github.sha }} run: ./scripts/utils/upload-artifact.sh + + - name: Upload MCP Server tarball + if: github.repository == 'stainless-sdks/julep-node' + env: + URL: https://pkg.stainless.com/s?subpackage=mcp-server + AUTH: ${{ steps.github-oidc.outputs.github_token }} + SHA: ${{ github.sha }} + BUILD_PATH: packages/mcp-server/dist + run: ./scripts/utils/upload-artifact.sh test: timeout-minutes: 10 name: test diff --git a/scripts/utils/upload-artifact.sh b/scripts/utils/upload-artifact.sh index bf54db9e..83951165 100755 --- a/scripts/utils/upload-artifact.sh +++ b/scripts/utils/upload-artifact.sh @@ -12,7 +12,7 @@ if [[ "$SIGNED_URL" == "null" ]]; then exit 1 fi -UPLOAD_RESPONSE=$(tar -cz dist | curl -v -X PUT \ +UPLOAD_RESPONSE=$(tar -cz "${BUILD_PATH:-dist}" | curl -v -X PUT \ -H "Content-Type: application/gzip" \ --data-binary @- "$SIGNED_URL" 2>&1) From 1ce88f05b38e6e58c248f4a0891142026bcfe98a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 23 Aug 2025 02:47:48 +0000 Subject: [PATCH 25/89] feat(mcp): change remote server query option parsing logic --- packages/mcp-server/src/options.ts | 20 ++++++++++++-------- packages/mcp-server/tests/options.test.ts | 2 +- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/packages/mcp-server/src/options.ts b/packages/mcp-server/src/options.ts index 9eb00b48..2100cf58 100644 --- a/packages/mcp-server/src/options.ts +++ b/packages/mcp-server/src/options.ts @@ -366,16 +366,20 @@ export function parseQueryOptions(defaultOptions: McpOptions, query: unknown): M } } + let dynamicTools: boolean | undefined = + queryOptions.no_tools && !queryOptions.no_tools?.includes('dynamic') ? false + : queryOptions.tools?.includes('dynamic') ? true + : defaultOptions.includeDynamicTools; + + let allTools: boolean | undefined = + queryOptions.no_tools && !queryOptions.no_tools?.includes('all') ? false + : queryOptions.tools?.includes('all') ? true + : defaultOptions.includeAllTools; + return { client: queryOptions.client ?? defaultOptions.client, - includeDynamicTools: - defaultOptions.includeDynamicTools === false ? - false - : queryOptions.tools?.includes('dynamic') && !queryOptions.no_tools?.includes('dynamic'), - includeAllTools: - defaultOptions.includeAllTools === false ? - false - : queryOptions.tools?.includes('all') && !queryOptions.no_tools?.includes('all'), + includeDynamicTools: dynamicTools, + includeAllTools: allTools, includeCodeTools: undefined, filters, capabilities: clientCapabilities, diff --git a/packages/mcp-server/tests/options.test.ts b/packages/mcp-server/tests/options.test.ts index 24604b84..a8a5b81a 100644 --- a/packages/mcp-server/tests/options.test.ts +++ b/packages/mcp-server/tests/options.test.ts @@ -297,7 +297,7 @@ describe('parseQueryOptions', () => { ]); expect(result.client).toBe('cursor'); - expect(result.includeDynamicTools).toBe(undefined); + expect(result.includeDynamicTools).toBe(true); }); it('should override client from default options', () => { From 3ea626ec8f75069484d2a0a4fd133c7993c94dbe Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 27 Aug 2025 02:55:32 +0000 Subject: [PATCH 26/89] feat(mcp): add client infer to cloudflare oauth screen --- packages/mcp-server/cloudflare-worker/src/utils.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/mcp-server/cloudflare-worker/src/utils.ts b/packages/mcp-server/cloudflare-worker/src/utils.ts index 5803d74a..866cb172 100644 --- a/packages/mcp-server/cloudflare-worker/src/utils.ts +++ b/packages/mcp-server/cloudflare-worker/src/utils.ts @@ -300,11 +300,12 @@ export const renderLoggedOutAuthorizeScreen = async ( class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-primary/50 focus:border-primary" > +