Skip to main content
Glama

How to write a routine

how_to_write_a_routine
Read-onlyIdempotent

The JSON form Routine Run reads a routine in: every field and every action a step can take. Use it when writing a routine for routine_link, start_new_run or propose_new_routine.

Input Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so the safety profile is covered. The description adds genuinely new behavioral information by describing what the call returns — the complete field set and action vocabulary of a routine — which is the key trait for a zero-argument reference tool.

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 short sentences, with the description of the output leading and the usage trigger following. No filler or repetition of the title, though the opening clause 'The JSON form Routine Run reads a routine in' is slightly convoluted.

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 no-parameter, no-output-schema reference tool, the description covers the two things an agent needs: what the payload contains and when to fetch it. It could be marginally stronger by naming an example field or step action, but nothing essential is missing.

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

Parameters4/5

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

The tool takes no parameters, so per the rubric the baseline is 4. There is nothing for the description to clarify about inputs, and it correctly spends no words on parameter semantics.

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 goes beyond the name by stating that the tool returns the JSON form Routine Run reads — every field and every action a step can take. That identifies it as a schema/reference tool rather than an action tool, which is enough to separate it from routine_link and find_starter_routine. It stops short of explicitly contrasting itself with those siblings, so it lands at 4 rather than 5.

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 gives an explicit trigger: 'Use it when writing a routine for routine_link, start_new_run or propose_new_routine.' That is concrete when-to-use guidance tied to named consumers of the output. It does not state when *not* to call it, which keeps it below a 5.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.