Skip to content

Commit 12bd79f

Browse files
fix(mcp): generate additionalProperties=true for map schemas to avoid validation issues
1 parent dc011fe commit 12bd79f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+367
-44
lines changed

packages/mcp-server/src/tools/agents/create-agents.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export const metadata: Metadata = {
1818
export const tool: Tool = {
1919
name: 'create_agents',
2020
description:
21-
"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```",
21+
"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```",
2222
inputSchema: {
2323
type: 'object',
2424
properties: {
@@ -37,6 +37,7 @@ export const tool: Tool = {
3737
default_settings: {
3838
type: 'object',
3939
title: 'Default Settings',
40+
additionalProperties: true,
4041
},
4142
default_system_template: {
4243
type: 'string',
@@ -59,6 +60,7 @@ export const tool: Tool = {
5960
metadata: {
6061
type: 'object',
6162
title: 'Metadata',
63+
additionalProperties: true,
6264
},
6365
model: {
6466
type: 'string',

packages/mcp-server/src/tools/agents/create-or-update-agents.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export const metadata: Metadata = {
1818
export const tool: Tool = {
1919
name: 'create_or_update_agents',
2020
description:
21-
"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```",
21+
"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```",
2222
inputSchema: {
2323
type: 'object',
2424
properties: {
@@ -41,6 +41,7 @@ export const tool: Tool = {
4141
default_settings: {
4242
type: 'object',
4343
title: 'Default Settings',
44+
additionalProperties: true,
4445
},
4546
default_system_template: {
4647
type: 'string',
@@ -63,6 +64,7 @@ export const tool: Tool = {
6364
metadata: {
6465
type: 'object',
6566
title: 'Metadata',
67+
additionalProperties: true,
6668
},
6769
model: {
6870
type: 'string',

packages/mcp-server/src/tools/agents/docs/bulk-delete-agents-docs.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ export const tool: Tool = {
3333
metadata_filter: {
3434
type: 'object',
3535
title: 'Metadata Filter',
36+
additionalProperties: true,
3637
},
3738
jq_filter: {
3839
type: 'string',

packages/mcp-server/src/tools/agents/docs/create-agents-docs.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export const metadata: Metadata = {
1818
export const tool: Tool = {
1919
name: 'create_agents_docs',
2020
description:
21-
"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```",
21+
"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```",
2222
inputSchema: {
2323
type: 'object',
2424
properties: {
@@ -49,6 +49,7 @@ export const tool: Tool = {
4949
connection_pool: {
5050
type: 'object',
5151
title: 'Connection Pool',
52+
additionalProperties: true,
5253
},
5354
embed_instruction: {
5455
type: 'string',
@@ -57,6 +58,7 @@ export const tool: Tool = {
5758
metadata: {
5859
type: 'object',
5960
title: 'Metadata',
61+
additionalProperties: true,
6062
},
6163
jq_filter: {
6264
type: 'string',

packages/mcp-server/src/tools/agents/docs/list-agents-docs.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export const metadata: Metadata = {
1818
export const tool: Tool = {
1919
name: 'list_agents_docs',
2020
description:
21-
"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```",
21+
"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```",
2222
inputSchema: {
2323
type: 'object',
2424
properties: {
@@ -42,6 +42,7 @@ export const tool: Tool = {
4242
metadata_filter: {
4343
type: 'object',
4444
title: 'MetadataFilter',
45+
additionalProperties: true,
4546
},
4647
offset: {
4748
type: 'integer',

0 commit comments

Comments
 (0)