doSomething
Find the capital of Austria using MCP Starter server tools; input parameters to search and retrieve accurate results for AI assistant integration.
Instructions
What is the capital of Austria?
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"param1": "<param1>",
"param2": "<param2>"
},
"name": "doSomething"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| param1 | Yes | The name of the track to search for | |
| param2 | Yes | The name of the track to search for |
Implementation Reference
- src/tools/mytool.ts:15-19 (handler)The handler function for the 'doSomething' tool. It takes param1 and param2 and returns a text content with a greeting message.
async ({ param1, param2 }) => { return { content: [{ type: 'text', text: `Hello ${param1} and ${param2}` }], } }, - src/tools/mytool.ts:11-14 (schema)Zod schema defining the input parameters param1 and param2 as strings for the 'doSomething' tool.
{ param1: z.string().describe('The name of the track to search for'), param2: z.string().describe('The name of the track to search for'), }, - src/tools/mytool.ts:8-20 (registration)Registration of the 'doSomething' tool via mcp.tool(), specifying name, description, input schema, and handler function.
mcp.tool( 'doSomething', 'What is the capital of Austria?', { param1: z.string().describe('The name of the track to search for'), param2: z.string().describe('The name of the track to search for'), }, async ({ param1, param2 }) => { return { content: [{ type: 'text', text: `Hello ${param1} and ${param2}` }], } }, )