MCP: add tool annotations, prompts, mimeType, and capabilities

- Add tool annotations (readOnlyHint, destructiveHint, idempotentHint, openWorldHint) to all 40+ tools
- Register 3 MCP prompts: trip-summary, packing-list, budget-overview
- Add explicit mimeType: application/json to all resource registrations
- Announce capabilities with listChanged on resources, tools, prompts
- Update server name to 'TREK MCP' in MCP initialization
This commit is contained in:
unknown
2026-04-06 10:43:31 +02:00
committed by jubnl
parent cbdfe74bb9
commit a012dffa22
3 changed files with 197 additions and 15 deletions
+9 -1
View File
@@ -128,7 +128,15 @@ export async function mcpHandler(req: Request, res: Response): Promise<void> {
}
// Create a new per-user MCP server and session
const server = new McpServer({ name: 'trek', version: '1.0.0' });
const server = new McpServer({
name: 'TREK MCP',
version: '1.0.0',
capabilities: {
resources: { listChanged: true },
tools: { listChanged: true },
prompts: { listChanged: true },
},
});
registerResources(server, user.id);
registerTools(server, user.id);