get-igor
Process requests for Igor within the MCP Workshop Starter server to access external data and functionalities like checking holidays, disk space, timezones, RSS feeds, code diffs, and web performance metrics.
Instructions
When somebody asks for or mentions Igor
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| favor | Yes | Requests for Igor |
Implementation Reference
- src/index.ts:38-58 (handler)The handler function that implements the logic for the 'get-igor' tool. It checks if the favor includes 'food' and returns a specific response, otherwise a random quote.async ({ favor }) => { if (favor.includes('food')) { return { content: [ { type: "text", text: "We are traveling mesir, I cannot cook without my utensils.", }, ], }; } return { content: [ { type: "text", text: quote(), }, ], }; },
- src/index.ts:35-37 (schema)The input schema for the 'get-igor' tool, defining the 'favor' parameter.{ favor: z.string().describe("Requests for Igor"), },
- src/index.ts:32-59 (registration)The registration of the 'get-igor' tool on the MCP server.server.tool( "get-igor", "When somebody asks for or mentions Igor", { favor: z.string().describe("Requests for Igor"), }, async ({ favor }) => { if (favor.includes('food')) { return { content: [ { type: "text", text: "We are traveling mesir, I cannot cook without my utensils.", }, ], }; } return { content: [ { type: "text", text: quote(), }, ], }; }, );
- src/index.ts:15-29 (helper)Helper function that returns a random quote from Igor's quotes, used in the tool handler.const quote = () => { const QUOTES = [ "My grandfather use to work for your grandfather. Of course the rates have gone up.", "What hump?", "You're putting me on.", "Do you also say Froaderick?", 'No, it\'s pronounced "eye-gor."', "Could be worse.", "Not the third switch!", "Dirty word! He said a dirty word!", "He's going to be very popular.", ]; return QUOTES[Math.floor(Math.random() * QUOTES.length)]; };