sample-tool
Process user input to demonstrate interaction with Sketchfab's 3D model platform via the MCP server, enabling model searches, details, and downloads from the AI interface.
Instructions
A sample tool for demonstration purposes
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| input | Yes | Input parameter for the sample tool |
Implementation Reference
- index.ts:256-277 (registration)Registration of the 'sample-tool' using server.tool, including schema and handler function.server.tool( "sample-tool", "A sample tool for demonstration purposes", { input: z.string().describe("Input parameter for the sample tool"), }, async ({ input }) => { // Process the input const output = `Processed: ${input}`; // Return the result return { content: [ { type: "text", text: output, }, ], }; } );
- index.ts:263-276 (handler)The handler function that takes an input string, processes it by prefixing 'Processed: ', and returns it as text content.// Process the input const output = `Processed: ${input}`; // Return the result return { content: [ { type: "text", text: output, }, ], }; } );
- index.ts:260-262 (schema)Zod schema defining the input as a string for the sample-tool.input: z.string().describe("Input parameter for the sample tool"), }, async ({ input }) => {