Skip to main content
Glama
gregkop

Sketchfab MCP Server

by gregkop

sketchfab-model-details

Retrieve comprehensive details for any Sketchfab 3D model using its unique ID, including specifications, creator information, and download options.

Instructions

Get detailed information about a specific Sketchfab model

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelIdYesThe unique ID of the Sketchfab model (found in URLs or search results)

Implementation Reference

  • The main handler function that implements the tool logic: checks for API key, instantiates SketchfabApiClient, calls getModel on the modelId, formats the result using formatModelForDisplay, and returns markdown-formatted text content or error message.
    async ({ modelId }) => {
      try {
        // Check if API key is available
        if (!apiKey) {
          return {
            content: [
              {
                type: "text",
                text: "No Sketchfab API key provided. Please provide an API key using the --api-key parameter or set the SKETCHFAB_API_KEY environment variable.",
              },
            ],
          };
        }
    
        // Create API client
        const client = new SketchfabApiClient(apiKey);
        
        // Get model details
        const model = await client.getModel(modelId);
        
        // Format model details
        const formattedModel = formatModelForDisplay(model);
        
        return {
          content: [
            {
              type: "text",
              text: formattedModel,
            },
          ],
        };
      } catch (error: unknown) {
        const errorMessage = error instanceof Error ? error.message : String(error);
        
        return {
          content: [
            {
              type: "text",
              text: `Error getting model details: ${errorMessage}`,
            },
          ],
        };
      }
    }
  • Input schema using Zod, defining the required 'modelId' parameter as a string.
    {
      modelId: z.string().describe("The unique ID of the Sketchfab model (found in URLs or search results)"),
    },
  • index.ts:368-370 (registration)
    Tool registration via server.tool() with the tool name 'sketchfab-model-details' and description.
    server.tool(
      "sketchfab-model-details",
      "Get detailed information about a specific Sketchfab model",
  • Utility function that formats a SketchfabModel object into a human-readable string used in the tool's output.
    function formatModelForDisplay(model: SketchfabModel): string {
      const thumbnailUrl = model.thumbnails?.images?.[0]?.url || "No thumbnail";
      const username = model.user?.username || "Unknown";
      const downloadable = model.isDownloadable ? "Yes" : "No";
      
      return `
    [Model] ${model.name}
    ID: ${model.uid}
    Creator: ${username}
    Downloadable: ${downloadable}
    Thumbnail: ${thumbnailUrl}
    ${model.description ? `Description: ${model.description}` : ""}
    `;
    }
  • SketchfabApiClient method that performs the core API call to retrieve model details by UID, with error handling for not found, auth, etc.
    async getModel(uid: string): Promise<SketchfabModel> {
      try {
        const response = await axios.get(
          `${SketchfabApiClient.API_BASE}/models/${uid}`,
          {
            headers: this.getAuthHeader(),
          }
        );
        
        return response.data;
      } catch (error: unknown) {
        if (axios.isAxiosError(error) && error.response) {
          const status = error.response.status;
          if (status === 404) {
            throw new Error(`Model with UID ${uid} not found`);
          } else if (status === 401) {
            throw new Error("Invalid Sketchfab API key");
          }
          throw new Error(`Sketchfab API error (${status}): ${error.message}`);
        }
        throw error instanceof Error ? error : new Error(String(error));
      }
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool retrieves 'detailed information' but doesn't specify what that includes (e.g., metadata, statistics, licensing), whether it requires authentication, rate limits, or error handling. This leaves significant gaps for a tool that likely interacts with an external API.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence that efficiently conveys the core purpose without unnecessary words. It's front-loaded and wastes no space, making it easy for an agent to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with no annotations and no output schema, the description is insufficient. It doesn't explain what 'detailed information' includes, how results are structured, or potential errors. Given the external API context implied by the tool name, more behavioral and output details are needed for effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, clearly documenting the single required 'modelId' parameter with its purpose and source. The description doesn't add any additional semantic context beyond what the schema provides, so it meets the baseline score of 3 for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Get') and resource ('detailed information about a specific Sketchfab model'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'sketchfab-search' (which likely returns multiple models) or 'sketchfab-download' (which likely retrieves files rather than metadata).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'sketchfab-search' for finding models or 'sketchfab-download' for obtaining files, nor does it specify prerequisites such as needing a model ID from search results or URLs.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/gregkop/sketchfab-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server