Skip to main content
Glama

create_recipe

Save a named, parameterized DataFusion SQL query to the organization's recipe catalog; run_recipe runs it with arguments. Check the SQL with run_sql first. The output aliases are the contract callers read.

PARAMETERS are bound as typed values, never pasted into the SQL.

SLOTS are parts a caller may swap: a grain (the date_trunc unit), a dimension (the grouping column) or an optional_filter (a droppable WHERE conjunct). Widen an existing recipe with a slot rather than create a near-duplicate. This is ENFORCED: if a recipe already reads every table and column yours needs, the create is REFUSED, naming it. If a new recipe really is right, repeat the call with acknowledge_similar naming those ids.

The response names joins no declared TableLink vouches for and combinations worse than the defaults: relay those to the user.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "name": "<name>",
      "sql": "<sql>"
    },
    "name": "create_recipe"
  }
}

Input Schema

NameRequiredDescriptionDefault
sqlYesOne read-only statement over ids, as `run_sql` takes them. Every output column aliased. Parameters are `$name` (never `:name` or `$1`), each declared in `params`.
nameYesShort, specific name: what a colleague scans the catalog for.
slotsNoSlots, a JSON array of `grain`, `dimension` or `optional_filter` entries. A dimension's column, and every column it may be replaced by, must appear nowhere else in the recipe (WHERE, HAVING, another output column, a join condition), or it is refused. Allowed columns may come from any table the recipe reads.
paramsNoParameters, a JSON array of `{"name": "country", "kind": "String", "required": true}`. Values here are TAGGED (`{"t": "str", "v": "DE"}`, `{"t": "i64", "v": 10}`, `{"t": "bool", "v": true}`): an optional parameter takes `"default": {"t": "str", "v": "DE"}`, a restricted one `"choices": {"source": "literal", "values": [{"t": "str", "v": "DE"}]}`. `run_recipe` arguments are NOT tagged.
descriptionNoWhat the recipe computes, and any caveat a reader would need.
acknowledge_similarNoRecipe ids named in a `similar_recipe_exists` refusal, to create anyway.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only say this is a non-destructive write; the description goes well beyond by disclosing that duplicate-shape creates are REFUSED with the conflicting recipe named, that parameters are bound as typed values rather than interpolated into SQL, and that the response surfaces joins no TableLink vouches for that must be relayed to the user. These are non-obvious behaviors an agent could not infer from the schema or annotations.

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?

Purpose is front-loaded in the first clause and the remaining sentences are all load-bearing — no filler or restatement of the name. It is dense, though: phrases like 'combinations worse than the defaults' and the stacked caps-lock emphasis (PARAMETERS, SLOTS, ENFORCED, REFUSED) make it slower to parse than necessary.

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

Completeness5/5

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

For a six-parameter mutation tool with no output schema, the description covers the prerequisites, the dedup refusal loop, the params-vs-slots model, and what the response contains and how to handle it. Nothing an agent needs in order to call this correctly and recover from refusal appears to be 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?

Schema coverage is 100%, so the baseline is 3; the description earns above that by explaining the conceptual distinction between PARAMETERS (typed bind values) and SLOTS (swappable grain/dimension/optional_filter parts) and by framing the output aliases as the caller-facing contract. It does not restate the tagged-value literal syntax or slot column-exclusivity rules, but those are already fully documented in the schema.

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?

States a specific verb and resource — save a named, parameterized DataFusion SQL query to the recipe catalog — and immediately distinguishes itself from `run_recipe` (executes) and `run_sql` (ad-hoc check). An agent can tell exactly which of the sibling tools creates a persisted recipe.

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 preconditions (check the SQL with `run_sql` first) and an explicit alternative path (widen an existing recipe with a slot instead of creating a near-duplicate). It also documents the refusal path and the exact escape hatch (`acknowledge_similar` naming the returned ids), so the agent knows what to do when creation is blocked.

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