Skip to main content
Glama

cache_model

Add a 3D model file to the local cache for reuse across jobs, storing metadata and detecting duplicates by SHA-256 hash.

Instructions

Add a 3D model file to the local cache for reuse across jobs.

        Copies the file into ``~/.kiln/model_cache/`` and stores metadata
        (source, prompt, tags, dimensions) in the database.  Duplicate files
        are detected automatically by SHA-256 hash.

        Args:
            file_path: Path to the model file on disk.
            source: Origin — ``"thingiverse"``, ``"myminifactory"``, ``"meshy"``,
                ``"openscad"``, ``"upload"``, etc.
            source_id: Marketplace thing ID or generation job ID.
            prompt: For generated models, the text prompt used.
            tags: Comma-separated tags (e.g. ``"benchy,calibration,test"``).
            dimensions: JSON object with bounding box in mm, e.g.
                ``'{"x": 60, "y": 31, "z": 48}'``.
            metadata: Optional JSON object with extra data.
        

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": {
      "file_path": "<file_path>",
      "source": "<source>"
    },
    "name": "cache_model"
  }
}

Input Schema

NameRequiredDescriptionDefault
tagsNoComma-separated tags (e.g. ``"benchy,calibration,test"``).
promptNoFor generated models, the text prompt used.
sourceYesOrigin — ``"thingiverse"``, ``"myminifactory"``, ``"meshy"``, ``"openscad"``, ``"upload"``, etc.
metadataNoOptional JSON object with extra data.
file_pathYesPath to the model file on disk.
source_idNoMarketplace thing ID or generation job ID.
dimensionsNoJSON object with bounding box in mm, e.g. ``'{"x": 60, "y": 31, "z": 48}'``.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changedv1.5.1
    • addedInput schema / properties / dimensions / description
      Added value: +"JSON object with bounding box in mm, e.g. ``'{\"x\": 60, \"y\": 31, \"z\": 48}'``."
    • addedInput schema / properties / file_path / description
      Added value: +"Path to the model file on disk."
    • addedInput schema / properties / metadata / description
      Added value: +"Optional JSON object with extra data."
    • addedInput schema / properties / prompt / description
      Added value: +"For generated models, the text prompt used."
    • addedInput schema / properties / source / description
      Added value: +"Origin — ``\"thingiverse\"``, ``\"myminifactory\"``, ``\"meshy\"``, ``\"openscad\"``, ``\"upload\"``, etc."
    • addedInput schema / properties / source_id / description
      Added value: +"Marketplace thing ID or generation job ID."
    • addedInput schema / properties / tags / description
      Added value: +"Comma-separated tags (e.g. ``\"benchy,calibration,test\"``)."
  2. Changed7 schema fields changedv1.5.0
    • changedInput schema / properties / dimensions / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "additionalProperties": true,
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedInput schema / properties / dimensions / default
      Removed value: -null
    • changedInput schema / properties / metadata / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "additionalProperties": true,
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedInput schema / properties / metadata / default
      Removed value: -null
    • removedInput schema / properties / prompt / default
      Removed value: -null
    • removedInput schema / properties / source_id / default
      Removed value: -null
    • removedInput schema / properties / tags / default
      Removed value: -null
  3. First observedv0.1.0

TDQS

A3.5/5.0
Behavior4/5

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

The annotations mention only readOnlyHint=false and destructiveHint=false. The description adds useful context: the file is copied into ~/.kiln/model_cache and metadata is written to the database, so the call has both file-system and persistent side effects. It also discloses deduplication by SHA-256, which tells the agent the call is idempotent. It does not say what happens when a duplicate is found (for example, whether an existing record is returned or an error is raised), which is a moderate gap.

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

Conciseness3/5

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

The opening paragraph is front-loaded and works well. However, the Args block repeats the schema descriptions word for word, so there is redundant bulk for a tool whose parameters are already fully documented in the schema.

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

Completeness3/5

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

For a 7-parameter, non-destructive mutation tool with no output schema, the description leaves a significant gap: it does not say what is returned, such as a cached-model ID or path, which the agent would need in order to reference the model later using get_cached_model. Otherwise, the side effects and the deduplication rule are adequately covered.

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 digits after the parameter names match the schema, and they are identical to the schema descriptions, so the description adds little new meaning. It does give useful concrete formats for dimensions and tags and a list of valid source values, but because coverage is already 100%, the baseline of 3 is the right score.

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 names a specific verb and resource: it adds a 3D model file to a local cache and records its metadata. That is clearly distinct from a build or print operation. It does not, however, distinguish itself from nearby siblings such as cache_design, cache_design_with_source, or get_cached_model, so the agent must infer which caching entry point applies.

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

Usage Guidelines3/5

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

The phrase 'for reuse across jobs' implies the use case, but there is no explicit statement of when to call this tool versus the sibling caching tools or which input types it should be used for. There are no exclusions and no conditions that would steer the agent to an alternative.

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

Deploy Server

Other Tools