sample-tool
Demonstrates how to interact with Sketchfab's 3D model platform through AI interfaces for searching, viewing details, and downloading 3D models.
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:262-275 (handler)The handler function for 'sample-tool' that takes an input string, prefixes it with 'Processed: ', and returns it as text content.async ({ input }) => { // Process the input const output = `Processed: ${input}`; // Return the result return { content: [ { type: "text", text: output, }, ], }; }
- index.ts:259-261 (schema)Zod input schema for 'sample-tool' defining a single string parameter.{ input: z.string().describe("Input parameter for the sample tool"), },
- index.ts:256-276 (registration)Registration of 'sample-tool' via server.tool call, specifying name, description, 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, }, ], }; } );