Skip to main content
Glama

trim

Auto-crop blank margins around ASCII/braille drawings so the canvas hugs its content. Use pad to retain a blank-cell border.

Instructions

Auto-crop the blank margins around the drawing so the canvas hugs the content (like the gallery save does, but in place). Treats an ASCII space and the braille-blank as margin. pad keeps a border of that many blank cells. A fully blank canvas collapses to 1x1.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "trim"
  }
}

Input Schema

NameRequiredDescriptionDefault
padNoBlank-cell border to keep around the content.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and does substantial work: it defines exactly which characters count as margin ('an ASCII space and the braille-blank'), states the mutation is in place, and documents the degenerate case ('A fully blank canvas collapses to 1x1'). It omits whether the operation is reversible/undoable and what is returned, which are the main remaining gaps for a mutating tool.

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?

Three short sentences, front-loaded with the core action and effect, then edge-case behavior. No filler, and every sentence contributes a distinct fact (what it does, how margin is defined, blank-canvas fallback).

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

Completeness4/5

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

For a single-optional-parameter mutation with no annotations and no output schema, the definition covers the operation, its margin semantics, and its edge case, which is nearly everything needed to call it correctly. The one thing left implicit is what the tool returns or whether the prior canvas state is recoverable.

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?

Schema coverage is 100% and the single `pad` parameter is already documented as a 'blank-cell border to keep around the content'. The description restates that as 'keeps a border of that many blank cells', adding little beyond the schema, so the baseline 3 applies.

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

Purpose5/5

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

The description opens with a specific verb+resource pair ('Auto-crop the blank margins around the drawing') and states the resulting effect ('the canvas hugs the content'). It also disambiguates itself from the gallery-save path with 'but in place', so an agent can tell this mutates the working canvas rather than persisting a copy.

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

Usage Guidelines4/5

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

Usage context is clear: apply it when you want the canvas to hug content, and the parenthetical 'like the gallery save does, but in place' tells the agent this is the in-place counterpart to saving to the gallery. It stops short of explicit when-not guidance or naming an alternative crop-style tool, which keeps it at a 4.

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