Skip to main content
Glama

terse_alias_define

Define a session alias that expands to a reusable Terse form, so repeated subtrees can be written once and referenced with a short $alias.

Instructions

Define a session macro: $alias expands to the given Terse form everywhere it appears as a variable afterwards. Define a repeated subtree once, then write $alias (1-2 tokens) instead of the full form. $names are reserved for aliases — do not bind them with let/def/fn.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aliasYesAlias name, e.g. $1.
expansionYesTerse source the alias expands to.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It usefully discloses that aliases are session-scoped, expand everywhere the $name appears as a variable, and that $names are reserved ('do not bind them with let/def/fn'). It does not cover redefinition/overwrite semantics or error behavior, leaving meaningful gaps for a state-mutating define.

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?

Three sentences, core definition front-loaded, with the reserved-namespace warning last where it belongs. Mostly efficient, though the middle sentence partly explains the alias feature rather than this tool.

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 2-parameter tool with full schema coverage and no output schema, the basics are covered and return values need no explanation. However, it omits what happens if an alias already exists or if the expansion is invalid, which an agent would want to know before calling.

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 description coverage is 100%, so both parameters are already documented (the $1 example for alias, 'Terse source' for expansion). The description restates that $alias maps to the given Terse form but adds no syntax or format detail 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.

Purpose4/5

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

States a specific verb and resource: 'Define a session macro'. The session-scoped framing implicitly separates it from terse_alias_list and terse_alias_clear, but it does not name any sibling to sharpen the distinction.

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?

Gives a concrete use case ('Define a repeated subtree once, then write $alias... instead of the full form') that tells the agent when this tool is worthwhile. It stops short of explicit when-not guidance or routing to alternatives like terse_eval.

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