Skip to content

Commit

Permalink
Add workaround for Claude's MCP implementation bug
Browse files Browse the repository at this point in the history
  • Loading branch information
domdomegg committed Dec 13, 2024
1 parent 5c89294 commit deb00d0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/mcpServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ export class AirtableMCPServer implements IAirtableMCPServer {
const field = await this.airtableService.createField(
args.baseId,
args.tableId,
args.field,
args.nested.field,
);
return formatToolResponse(field);
}
Expand Down
5 changes: 4 additions & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,10 @@ export const UpdateTableArgsSchema = z.object({
export const CreateFieldArgsSchema = z.object({
baseId: z.string(),
tableId: z.string(),
field: FieldSchema,
// This is used as a workaround for https://github.com/orgs/modelcontextprotocol/discussions/90
nested: z.object({
field: FieldSchema,
}),
});

export const UpdateFieldArgsSchema = z.object({
Expand Down

0 comments on commit deb00d0

Please sign in to comment.