Skip to main content
Glama

create_insight_query

Save a new insight query as a chart and optionally add it to a dashboard. Pass the exact spec you already ran successfully with run_insight_query — run it first so you know it works. Adding to a dashboard also requires permission to edit dashboards. The query is saved when this runs; explain it in reason. Load the manage-dashboards, insight-queries skills (load_skill("manage-dashboards"), load_skill("insight-queries")) first.

Input Schema

NameRequiredDescriptionDefault
nameYesShort chart title, e.g. 'Daily active players'. No time range.
specYesThe insight definition — exactly the spec you ran with run_insight_query.
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.
dashboardIdNoDashboard to add the new query to (appended at the end). Omit to save it unattached.
descriptionNoPlain-language description of what the chart measures: the events, the aggregation, and any filter, cohort, or breakdown that changes its meaning, in one or two sentences. No time range. Always write one, even when the user did not ask for it.
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.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false and idempotentHint=false, so the write/repeat-run nature is partly covered. The description adds value beyond that by stating the query is persisted when this runs and that attaching to a dashboard requires dashboard-edit permission — a real auth constraint not visible in 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?

Four short sentences, front-loaded with the action and followed by prerequisites and permission notes; nothing is padded. The skill-loading sentence is slightly boilerplate but still functional guidance, keeping it just below a top score.

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 7-parameter mutation tool with a large nested spec, the description covers the workflow, the spec-reuse requirement, permission needs, and the optional dashboard link. The only notable gap is that it never indicates what comes back on success (e.g. a saved query id), which would help an agent chain further calls.

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 description coverage is 100%, so the baseline is 3. The description still adds meaningful guidance by telling the agent the spec must be the exact one previously validated via run_insight_query, and that reason is what gets shown on the approval card — context the schema text does not fully carry.

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?

The opening sentence gives a specific verb and resource — 'Save a new insight query as a chart' — plus the optional dashboard attachment, which cleanly separates it from run_insight_query (execute) and update_insight_query (modify existing). An agent can tell what this creates without opening the schema.

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 a concrete workflow prerequisite: run the spec with run_insight_query first and reuse the exact spec that succeeded. It also states the dashboard-edit permission requirement and directs loading the manage-dashboards and insight-queries skills first. It stops short of saying when to prefer update_insight_query or add_query_to_dashboard instead, so not a full 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.

Resources