Skip to main content
Glama

lookup_operator

Look up a PostScript operator's exact definition, including stack signature, category, required language level, and possible errors, to ensure correct usage.

Instructions

Return the exact PLRM definition of a PostScript operator.

Gives the stack signature (operands operator results), a summary, the LanguageLevel it requires, and the errors it can raise. Use this to get operand order and types right instead of guessing.

Example: lookup_operator("arc") → signature "x y r ang1 ang2 arc -", category "path", level 1.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description must disclose behavior. It states the return content (signature, summary, level, errors) and gives an example output, implying a read-only operation. It does not cover error handling (e.g., unknown operator), a minor omission, but the description is largely transparent.

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 concise and well-structured: purpose first, then details, then usage guidance, and finally an example. Every sentence adds value with no redundancy.

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 simple single-parameter lookup with no output schema, the description covers purpose, return details, and usage. It lacks information about error behavior or edge cases, but these are minor for the tool's simplicity. The example adds practical completeness.

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 0%, so the description must compensate. The example 'lookup_operator("arc")' implies the 'name' parameter is the operator name, but it does not explicitly define it or mention constraints like case sensitivity or exact spelling. The description adds some value but is not fully explicit.

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 clearly states the action ('Return the exact PLRM definition') and the resource (a PostScript operator). It also enumerates the specific details returned (stack signature, summary, LanguageLevel, errors) and includes an example, making it distinct from sibling search tools.

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?

It explicitly says 'Use this to get operand order and types right instead of guessing,' providing a clear use case. However, it does not mention when to avoid this tool or suggest alternatives like search_operators, so exclusions are not explicit.

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