Skip to main content
Glama
Hardik-Singh

Invariance MCP

Official
by Hardik-Singh

invariance_saved_view_run

Run a stored saved view or an ad-hoc query on Invariance observability data by supplying either saved_view_id or source with spec, and return the result.

Instructions

Run a query and return the result. Pass EITHER saved_view_id OR source+spec (exactly one).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
specNoQuerySpec as a JSON object string. Fields (all optional): fields (string[]), filters ([{"field","op":"eq|neq|in|gt|gte|lt|lte","value"}]), group_by (string), aggregation ("count|sum|avg|min|max|count_distinct"), aggregation_field (string), order_by (string), order_dir ("asc|desc"), limit (int). Example: {"filters":[{"field":"status","op":"eq","value":"open"}],"aggregation":"count"}
sourceNoAd-hoc query source; requires spec.
saved_view_idNoRun a stored saved view by ID.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A3.6/5.0
Behavior2/5

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

Annotations already declare readOnlyHint and destructiveHint, but the description adds almost no behavioral context: it does not disclose whether running a query persists data, increments usage, or has side effects. With readOnlyHint=false, the agent is left uncertain about mutation potential.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two short sentences with no filler. The core action and exclusivity rule are both front-loaded, making it easy to consume.

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

Completeness3/5

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

The description covers the key invocation contract but omits any guidance on output shape, side-effect expectations, or expected return format — despite having no output schema. Given the richness of the schema, it is minimally complete but not fully contextual.

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 descriptions already document each field. The description adds crucial inter-parameter semantics with 'EITHER saved_view_id OR source+spec (exactly one),' clarifying a constraint that the flat schema alone does not enforce.

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 identifies the action as 'Run a query and return the result,' backed by the saved_view_id OR source+spec distinction. It does not explicitly differentiate from sibling tools like invariance_run_start or invariance_list_runs, but the purpose is still understandable and specific enough.

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?

The description gives an explicit usage rule: pass exactly one of saved_view_id or source+spec. This is valuable and prevents invalid requests, though it does not discuss when to prefer this tool over related siblings like invariance_saved_view_get or invariance_run_list.

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

Deploy Server

Other Tools