Skip to main content
Glama

Expand Gerbil Macro

gerbil_expand_macro

Expand Gerbil Scheme macros to show core-expanded forms using syntax->datum, revealing how expressions transform during compilation.

Instructions

Show the macro expansion of a Gerbil Scheme expression. Returns the core-expanded form using syntax->datum. Example: "(when #t (displayln "hi"))" expands to a %#if form.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
expressionYesThe Gerbil expression to expand
importsNoModules to import for macro definitions
Behavior3/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 return behavior ('Returns the core-expanded form using syntax->datum') and gives an example output format, but lacks details on error handling, performance, or side effects. It adequately describes the core function without contradictions.

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 front-loaded with the core purpose, followed by a brief explanation of the return and a helpful example. Every sentence adds value without redundancy, making it efficient and well-structured.

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?

Given no annotations and no output schema, the description provides sufficient context for a read-only tool with two parameters. It explains what the tool does and the return format, though it could benefit from more behavioral details like error cases. It is mostly complete for its complexity.

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 the schema fully documents both parameters. The description does not add meaning beyond the schema, as it does not explain parameter interactions or provide additional context for 'imports' beyond what the schema states. Baseline 3 is appropriate.

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 specific action ('Show the macro expansion') and resource ('of a Gerbil Scheme expression'), distinguishing it from siblings like gerbil_eval (evaluation) or gerbil_check_syntax (syntax checking). It provides a concrete example to illustrate the transformation.

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 macro expansion scenarios with the example, but does not explicitly state when to use this tool versus alternatives like gerbil_eval for execution or gerbil_check_syntax for validation. No exclusions or prerequisites are mentioned.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ober/gerbil-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server