Skip to main content
Glama

get_pslib_fragment

Retrieve a named PSlib procedure's source and stack signature for reuse in PostScript.

Instructions

Return a PSlib procedure by name, with its stack signature and source.

PSlib is Kees van der Laan's library (colours, geometry such as circle inversion and Apollonius, Lauwerier fractals, Blue-Book text/graphics helpers). Reuse these vetted procedures instead of reinventing them. The source is ready to paste; include the whole library at run time with e.g. (PSlib.eps) run.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden. It discloses the output (stack signature and source), notes that the source is 'ready to paste,' and explains how to include the library. This is good behavioral transparency for a read-only retrieval. It does not mention failure behavior (e.g., if name is not found), but for a simple getter, this is a minor gap. The description adds value beyond what structured fields provide.

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

Conciseness4/5

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

The description is concise and front-loaded with the core purpose. The background on PSlib (Kees van der Laan's library) and the reuse advice are useful context that earns their place. It is two short paragraphs without wasted words, though the second sentence could be trimmed without losing meaning.

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 tool with one parameter and no output schema, the description is quite complete. It states what the tool returns (procedure, stack signature, source) and how to use the source. It does not describe the exact structure of the stack signature or error handling, but these are minor for a retrieval tool. Overall, an agent has enough context to call it correctly.

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 has a single 'name' parameter with 0% description coverage. The description clarifies that 'name' refers to a PSlib procedure, which adds some meaning beyond the bare schema. However, it does not specify the format, case sensitivity, or provide examples, leaving the agent to infer the exact expected value. Since schema coverage is zero, the description partially compensates but not fully.

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 a PSlib procedure by name, with its stack signature and source.' It names the specific resource (PSlib procedures) and the output. This distinguishes it from siblings like search_pslib, which would be for finding procedures without knowing the name, and lookup_operator, which targets operators. The purpose is unambiguous and specific.

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?

The description gives a clear usage rationale: 'Reuse these vetted procedures instead of reinventing them,' implying the tool should be used when a known PSlib procedure is needed. It also explains how to include the whole library at runtime. However, it does not explicitly state when not to use this tool or compare it with siblings like search_pslib, leaving some inference required.

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