Skip to main content
Glama

Store procedure

store_procedure

Store a reusable procedure: an ordered sequence of steps for a task you expect to repeat, retrievable later with match_procedures. A name that already exists is rejected; change an existing procedure with update_procedure. For timeless facts use store_fact; for one-off events use store_episode.

Args:
    name: Unique, human-readable identifier, e.g. "publish_blog_post".
    description: One-sentence summary of what the procedure achieves.
    steps: Ordered list of step dicts with keys: order (int), action (str),
        target (str, optional), parameters (dict, optional).
    context_tags: Tags describing when the procedure applies, used by
        `match_procedures`, e.g. ["blog", "publish"].

Example:
    store_procedure(
        name="publish_blog_post",
        description="Publish a draft post to the company blog.",
        steps=[
            {"order": 1, "action": "run the publish command",
             "parameters": {"slug": "<slug>"}},
            {"order": 2, "action": "confirm the post URL in the output"},
        ],
        context_tags=["blog", "publish"],
    )

Input Schema

NameRequiredDescriptionDefault
nameYes
stepsYes
descriptionYes
context_tagsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, idempotentHint=false, and destructiveHint=false, so the safety profile is partly covered. The description adds genuinely useful behavior not in the annotations: an existing name is rejected rather than overwritten, and procedures are meant to be retrieved later via match_procedures. It does not state what the tool returns or whether concurrent stores race, leaving a minor gap.

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?

Front-loaded summary before the Args block and example, with no filler sentences. The example is long but earns its place by showing the nested steps shape that the schema does not describe; a slightly tighter example could have made it a 5.

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 mutation tool with no output schema and annotation-only hints, the description covers purpose, alternatives, duplicate handling, and the full nested argument shape. Return values and post-store retrieval behavior are left implicit, which is acceptable given store/match symmetry but not fully spelled out.

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

Parameters5/5

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

Schema description coverage is 0%, so the description carries the full burden and does: it explains each of the four args with meaning and examples, and crucially documents the nested step dict keys (order, action, target, parameters) that the schema's additionalProperties:true leaves completely opaque. The worked example disambiguates the nested structure further.

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?

Opens with a specific verb+resource ('Store a reusable procedure') and immediately defines scope ('ordered sequence of steps for a task you expect to repeat, retrievable later with match_procedures'). It distinguishes itself from store_fact, store_episode, and update_procedure by name, so an agent can route without opening any schema.

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

Usage Guidelines5/5

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

Gives explicit when-to-use routing: 'For timeless facts use store_fact; for one-off events use store_episode', plus the duplicate-name rejection path ('change an existing procedure with update_procedure'). It names both the alternatives and the conditions that select them.

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.

Resources