Skip to main content
Glama

Costory: Your Finops MCP

get

Read-only

Retrieve a saved Costory dashboard, report, cost alert, budget, or virtual dimension by ID, or inspect a BigQuery job. Use when a request needs an object's full settings or widget configuration. For saved objects, this retrieves configuration rather than executing their data queries. Response includes a type discriminator (dashboard | budget | costAlert | report | virtualDimension | bigquery_job) — branch on it.

BigQuery jobs: pass id <project>:<location>.<job_id> (auto-detected from that shape, or set type: "bigquery_job"). Location is case-insensitive (EU and eu are the same). Loaded with the free Jobs API (jobs.get) — user_email, referenced tables, slot/bytes metrics, query_text, and performance_insights — plus stages and children when it is a script parent. Each stage has its name, slotMs, shuffle bytes, and the SQL clause (FROM / JOIN / WHERE / GROUP BY) that places it in query_text. Stages are sorted by slotMs descending. Timing histograms and column lists are omitted. Use it to investigate a BigQuery cost line's underlying query.

Dashboard / budget / cost alert / report / virtual dimension lookups:

Budgets: pass the parent budget id (from search) or a budget version id; response includes budgetVersionId for query, plus costMetricId, currency, virtualDimension (id, name, bqName, values), excludedValues, lines, includedVirtualDimensionValues, filterCelRestrictToIncludedLines, and filterCelExcludeExcludedVirtualDimensionValues for aligning query cost with budget. howToQueryAlignedCost gives concrete example payloads.

Cost alerts: pass the alert id (from search or list_alerts); response includes alert configuration plus firingHistory (every stored firing day and group values that fired). The payload includes scopeId, the saved team scope. The returned queries are the stored internal shape — read-only, and they do not contain that scope filter. To change the series with update_alert, write a fresh queries array with filterCel exactly as for create_alert; do not echo these back. The payload also includes messageWidgets (the alert's message content: one ALERT body widget plus optional extras, ordered by position) and messageExecutionId on notified firingHistory rows — pass it to get_alert_message_execution to inspect the run that notified.

Reports: config in words plus run-health (status, nextRunDate, lastRunHealth, widgets array, recent per-destination delivery with executionIds) and shared reportContext. Read-only. To inspect a specific delivery's content, call get_report_execution (then get_report_execution_widget for drill-down).

Virtual dimensions: id / virtualDimensionId (same), hasPendingDraft, immutable bqName (BigQuery/CEL field for groupBy/filterCel — never derive from display name); published and optional draft (name, description, tags, computeStatus, values, rules, leftoverRule; draft may include draftValidation); dependencies. values is derived — output only. leftoverRule is separate from rules — do not put it in the rules array or pass it to update. For updates, copy rules from draft if pending else published, project each rule to { id, name, conditionCel, allocation } (omit position, isLeftovers, and any leftover/catch-all rule), and pass that full rules array to update_virtual_dimension_draft. Call get_skill with skillId: "virtual-dimensions" for allocation shapes and workflow.

Dashboards: call get_skill with skillId: "dashboards" before create/update. Shared settings are dashboardContext (period, groupBy, metricId, currency, conditionsCel, scopeId). GroupBy supports a scalar compatibility value or an ordered array; preserve every array item in order. Null or [] means explicitly ungrouped. Cost and usage queries inherit the complete dashboard grouping when omitted; explicit overrides are retained. Budget and external metric grouping stays explicit. Chart widgets include x/y/w/h and resolved queryConfig; text widgets have type: "text" and textContent. After fetch, use get_dashboard_widget_data / get_dashboard_widget_image, or update_dashboard to mutate.

Use "search" (or list tools) first to discover IDs. Effects: Read-only retrieval or computation; does not change saved resources or send messages. Scope: Authorized Costory workspace only. EXAMPLE: "Open the Kubernetes dashboard" (after search returned its ID) → { id: "clx9abc123" }

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": {
      "id": "<id>"
    },
    "name": "get"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesID of a V2 dashboard, budget, cost alert, report, virtual dimension, or BigQuery job (from search / list tools). For budgets, pass parent budget id or budget version id. For BigQuery jobs, pass `<project>:<location>.<job_id>` — location is case-insensitive. Response includes a `type` discriminator: dashboard | budget | costAlert | report | virtualDimension | bigquery_job.
slugNoOrganization slug. Omit to auto-detect from your account (fails if you belong to multiple orgs).
typeNoRestrict the lookup to one resource type. Omit to try every type; a BigQuery job id is also auto-detected from its `<project>:<location>.<job_id>` shape.
contextNoOptional context used only for analytics; it does not affect tool execution. Omit it by default. Do not include conversation text, personal information, or workspace data.
llm_modelNoThe model identifier you are running as, for example "claude-opus-4-8" or "gpt-5.2". Pass "unknown" if you are not certain. Recorded for the server developer's analytics.
conversation_idNoThe conversation_id this server returned earlier in this conversation, unchanged, including after later user messages. Omit it if you have none. Recorded for the server developer's analytics.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / context / description
      Previous value: -"A few words on why you are calling this tool, for the server developer's analytics. Describe people and things by role, such as \"a customer\". Do not quote the user or include names, emails, or other personal details."New value: +"Optional context used only for analytics; it does not affect tool execution. Omit it by default. Do not include conversation text, personal information, or workspace data."
    • changedInput schema / required
      Previous value: -[
      -  "id",
      -  "context"
      -]New value: +[
      +  "id"
      +]
  2. Changed2 schema fields changed
    • changedInput schema / properties / context / description
      Previous value: -"Explain in 15-25 words, in third person, why this tool is called and how it supports the user's goal. For analytics only. You MUST describe only the abstract purpose of the tool call. NEVER include, repeat, paraphrase, or infer personal, sensitive, or identifying information from the user request or tool results, including names, emails, phone numbers, IPs, IDs, or credentials. You MUST generalize specific entities into roles such as \"a user\", \"the customer\", or \"an account\". Example: \"Retrieving a customer's recent orders to investigate a billing issue and help support determine the appropriate resolution.\""New value: +"A few words on why you are calling this tool, for the server developer's analytics. Describe people and things by role, such as \"a customer\". Do not quote the user or include names, emails, or other personal details."
    • changedInput schema / required
      Previous value: -[
      -  "id",
      -  "context",
      -  "llm_model"
      -]New value: +[
      +  "id",
      +  "context"
      +]
  3. Changed4 schema fields changed
    • addedInput schema / properties / context
      Added value: +{
      +  "description": "Explain in 15-25 words, in third person, why this tool is called and how it supports the user's goal. For analytics only. You MUST describe only the abstract purpose of the tool call. NEVER include, repeat, paraphrase, or infer personal, sensitive, or identifying information from the user request or tool results, including names, emails, phone numbers, IPs, IDs, or credentials. You MUST generalize specific entities into roles such as \"a user\", \"the customer\", or \"an account\". Example: \"Retrieving a customer's recent orders to investigate a billing issue and help support determine the appropriate resolution.\"",
      +  "type": "string"
      +}
    • addedInput schema / properties / conversation_id
      Added value: +{
      +  "description": "The conversation_id this server returned earlier in this conversation, unchanged, including after later user messages. Omit it if you have none. Recorded for the server developer's analytics.",
      +  "type": "string"
      +}
    • addedInput schema / properties / llm_model
      Added value: +{
      +  "description": "The model identifier you are running as, for example \"claude-opus-4-8\" or \"gpt-5.2\". Pass \"unknown\" if you are not certain. Recorded for the server developer's analytics.",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "id"
      -]New value: +[
      +  "id",
      +  "context",
      +  "llm_model"
      +]
  4. Changed1 schema field changed
    • changedInput schema / properties / id / description
      Previous value: -"ID of a V2 dashboard, budget, cost alert, report, virtual dimension, or BigQuery job (from search / list tools). For budgets, pass parent budget id or budget version id. For BigQuery jobs, pass the canonical `<project>:<location>.<job_id>` id. Response includes a `type` discriminator: dashboard | budget | costAlert | report | virtualDimension | bigquery_job."New value: +"ID of a V2 dashboard, budget, cost alert, report, virtual dimension, or BigQuery job (from search / list tools). For budgets, pass parent budget id or budget version id. For BigQuery jobs, pass `<project>:<location>.<job_id>` — location is case-insensitive. Response includes a `type` discriminator: dashboard | budget | costAlert | report | virtualDimension | bigquery_job."
  5. Changed2 schema fields changed
    • changedInput schema / properties / id / description
      Previous value: -"ID of a V2 dashboard, budget, cost alert, report, or virtual dimension (from search / list tools). For budgets, pass parent budget id or budget version id. Response includes a `type` discriminator: dashboard | budget | costAlert | report | virtualDimension."New value: +"ID of a V2 dashboard, budget, cost alert, report, virtual dimension, or BigQuery job (from search / list tools). For budgets, pass parent budget id or budget version id. For BigQuery jobs, pass the canonical `<project>:<location>.<job_id>` id. Response includes a `type` discriminator: dashboard | budget | costAlert | report | virtualDimension | bigquery_job."
    • addedInput schema / properties / type
      Added value: +{
      +  "description": "Restrict the lookup to one resource type. Omit to try every type; a BigQuery job id is also auto-detected from its `<project>:<location>.<job_id>` shape.",
      +  "enum": [
      +    "dashboard",
      +    "budget",
      +    "costAlert",
      +    "report",
      +    "virtualDimension",
      +    "bigquery_job"
      +  ],
      +  "type": "string"
      +}
  6. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare read-only, so the description earns credit by adding non-obvious behavioral facts: BigQuery jobs are loaded with the free Jobs API, histograms and column lists are omitted, stages are sorted by slotMs descending, stored `queries` are an internal read-only shape that must not be echoed back to update_alert, and virtual-dimension `values` is derived output-only. These are real gotchas that prevent corrupting a write path, well beyond what the annotations say.

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

Conciseness3/5

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

Front-loaded and sectioned by resource type, which helps for a tool spanning six entity kinds, but it is very long and several paragraphs are instructions for other tools (how to project `rules` for update_virtual_dimension_draft, how to build a `filterCel` for update_alert) rather than for invoking get. Useful content, but not every sentence earns its place here.

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?

With no output schema, the description carries the return-shape burden and does so per resource type (budget fields, costAlert firingHistory/messageWidgets, report run-health, virtualDimension published/draft, dashboard widget geometry). Combined with 100% schema coverage and read-only annotations, an agent has everything needed to call and interpret this correctly.

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 baseline is 3, but the description adds meaning to `id` that the schema does not: budget id vs budget version id, BigQuery job id shape with case-insensitive location, and the exhaustive list of payload fields per resource type returned for each id. It says little about slug/context/llm_model, which is acceptable given the schema documents them.

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 and an enumerated set of resources ('Retrieve a saved Costory dashboard, report, cost alert, budget, or virtual dimension by ID, or inspect a BigQuery job') and states the return discriminator, so an agent can distinguish this general fetcher from search/list_alerts/get_dashboard_widget_data without opening any schema. The generic tool name 'get' is fully compensated by the description.

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?

Explicit trigger ('Use when a request needs an object's full settings or widget configuration'), an explicit prerequisite ('Use search (or list tools) first to discover IDs'), and named alternatives with conditions (get_dashboard_widget_data / get_dashboard_widget_image for widget data, get_report_execution for delivery drill-down, get_skill before create/update, get_alert_message_execution for notified runs). When-to-use and when-to-delegate are both covered.

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