Skip to main content
Glama

create_saved_formula

Save a reusable formula: an expression plus its own metrics (letters A, B, … are those metrics, in order). Run it first as a self-contained formula metric in run_insight_query. Check list_saved_formulas so you don't duplicate one. Saved when this runs; explain it in reason. Load the insight-queries skill (load_skill("insight-queries")) first.

Input Schema

NameRequiredDescriptionDefault
nameYes
reasonYesWhy you are making this change, in one sentence the user will read on the approval card.
projectIdYesThe project (application) id to scope this call to. Use list_projects to discover valid ids.
definitionYes
descriptionNo
environmentYesThe environment name to scope this call to (e.g. 'production'). Use list_projects to discover the names available to this token.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, idempotentHint=false, destructiveHint=false, so the write/non-idempotent profile is known. The description adds real value beyond that: "Saved when this runs" clarifies the save takes effect immediately on execution, the duplicate-check instruction reinforces the non-idempotent warning, and "explain it in reason" signals the user-facing approval card. It does not say what a duplicate attempt does (reject vs. create another) or what is returned.

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?

Five short sentences, front-loaded with the core identity of the tool before the workflow prerequisites. Nothing is redundant. The phrasing is telegraphic ("Saved when this runs; explain it in reason"), which is efficient but slightly terse for a mutation.

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 with a deeply nested definition schema, 5 required parameters, and no output schema, the description covers the workflow prerequisites, the expression/metrics linkage, and the user-facing reason. Remaining gaps (return value, duplicate-name behavior, display formatting) are modest against a schema that documents most fields.

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 only 50%, and the bare `expression` field is just a length-bounded string, so the note that letters A, B, … in the expression refer to the entries of `metrics` in order supplies non-obvious meaning the schema cannot. It also directs the `reason` field's content for the approval card. It says nothing about `name`, `description`, `projectId`, `environment`, or `definition.display`, leaving roughly half the surface to the schema.

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?

States a specific verb and resource: "Save a reusable formula: an expression plus its own metrics," and clarifies the internal structure (letters A, B map to metrics in order). It implicitly separates itself from list_saved_formulas and update_saved_formula via the entities involved, though it never names update_saved_formula as the editing counterpart, so sibling differentiation is only partial.

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 an explicit ordered workflow: load the insight-queries skill first, dry-run the expression as a self-contained formula metric in run_insight_query, check list_saved_formulas to avoid duplicates, then save. It names the two alternative tools (run_insight_query, list_saved_formulas) and the condition under which each is used before this one.

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