Skip to main content
Glama

tool_code_generate

Generates a safe starter extraction recipe function from a spec, requiring validation before execution.

Instructions

Generate a safe starter extraction recipe function for the proposed spec. The result must still be validated before running.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
specNo
Behavior2/5

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

With no annotations, the description carries full burden for behavioral disclosure. It mentions 'safe starter' and that the result 'must still be validated before running,' hinting at safety concerns, but does not explain what safety means, side effects, permissions, or return format. Significant gaps remain.

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?

Two sentences convey purpose and a critical validation caveat with no unnecessary words. The structure is efficient, though the second sentence could be integrated into usage guidelines for improved organization.

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

Completeness2/5

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

Given the tool generates code with no output schema, no annotations, and a deeply nested input schema, the description lacks completeness. It does not explain the output format, language, error behavior, or how to construct a valid spec. The agent would need to infer or experiment to use this tool effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The single parameter 'spec' (object, default empty) has 0% schema coverage. The description adds that it's a 'proposed spec' for an extraction recipe, but does not describe its internal structure or expected keys. The agent gains minimal insight beyond the parameter name.

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?

The description clearly states the tool generates a 'safe starter extraction recipe function' for a proposed spec, distinguishing it from siblings like tool_code_validate and tool_code_run_sandboxed. The verb 'Generate' and resource 'extraction recipe function' provide specificity, though the name is slightly broader than the described purpose.

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

Usage Guidelines2/5

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

The description only implies a validation step is needed but provides no explicit guidance on when to use this tool versus alternatives (e.g., tool_code_validate, tool_code_run_sandboxed). No context on prerequisites, when-not-to-use, or workflow placement is given.

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/KazKozDev/footnote-mcp'

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