Skip to main content
Glama

trim_path

Reveals only a chosen segment of a layer's stroke by setting start, end, and offset values (0–1), enabling line-draw or progress effects that can be animated with keyframes.

Instructions

Reveal only part of a layer's stroke (line-draw / progress effect). start/end/offset are 0–1. Animate the reveal by keyframing layers..style.stroke.trim.end.

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": {
      "layerId": "<layerId>"
    },
    "name": "trim_path"
  }
}

Input Schema

NameRequiredDescriptionDefault
endNoVisible segment end 0–1 (default 1)
startNoVisible segment start 0–1 (default 0)
offsetNoShift the trim window 0–1 (default 0)
layerIdYesLayer with a stroke to trim
requestIdNo
sessionIdNo
expectedRevisionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

The annotations establish that this is a non-read-only, non-open-world mutation. The description adds useful context about the visual effect and animation path, but it does not clarify reversibility, error behavior, or what happens if the layer has no stroke.

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 short, front-loaded, and wastes no space. The purpose and the animation hint are both presented efficiently.

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 mutation tool with seven parameters and no output schema, the description covers the core trim behavior but leaves optional session/concurrency parameters and failure modes unexplained. It is adequate to invoke the tool in simple cases but incomplete for error-prone or concurrent 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 schema already documents start, end, offset, and layerId, including the 0–1 ranges. The description reinforces the range and adds the keyframe property path for the end value, but it does not explain requestId, sessionId, or expectedRevision.

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 states a specific operation: revealing part of a layer's stroke for a line-draw or progress effect, and it names the trim parameters. It is clear what the tool does, though it does not explicitly distinguish itself from related path or stroke siblings.

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 description implies usage for line-draw/progress effects and even tells how to animate the reveal via keyframing. It does not state when to choose this over alternatives such as add_path or update_layer, nor does it mention prerequisites or exclusions.

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