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. The first fetch is cached in Postgres (a finished job never changes); the second call is a cache hit. 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). 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. 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>",
      "context": "<context>"
    },
    "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.
contextYesA 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.
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: -"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"
      +]
  2. 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"
      +]
  3. 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."
  4. 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"
      +}
  5. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already cover read-only safety, and the description goes far beyond them: it discloses BigQuery job caching (first fetch cached in Postgres, second is a cache hit), that stages are sorted by slotMs descending with histograms and column lists omitted, that cost alert `queries` are read-only internal shape lacking the scope filter and must not be echoed back, and that virtual dimension `values` are output-only and `leftoverRule` must be excluded. This is rich, load-bearing behavioral context.

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?

The general purpose and discriminator are front-loaded and per-resource paragraphs are bolded for scanning, which helps. However, the description is very long and includes dense implementation detail (e.g., exact rule projection for virtual dimension updates) that may bury key points rather than every sentence earning its place.

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-type polymorphic lookup with no output schema, the description covers each resource's returned fields, caching behavior, and follow-up tool calls comprehensively. Nothing an agent needs to invoke it correctly across the enumerated resource types is 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, and the schema already documents `id` shapes, location case-insensitivity, and the type discriminator. The description adds the actionable instruction to branch on the returned `type` and clarifies budget/version id and BigQuery job id shapes, though much of the id detail duplicates the schema. Slightly above baseline for the branching guidance it contributes.

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 (Retrieve) and enumerates exactly what resources it returns — dashboard, report, cost alert, budget, virtual dimension, or BigQuery job — plus the `type` discriminator that distinguishes them. This lets an agent tell it apart from siblings like search, get_report_execution, and get_dashboard_widget_data without opening a schema.

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?

Explicitly says when to use it ('needs an object's full settings or widget configuration'), how to obtain IDs first ('Use search'), and routes to alternatives for related needs: get_report_execution for delivery content, get_dashboard_widget_data/image after fetching, update_dashboard to mutate, and get_skill with specific skillIds before create/update. It also states what the tool does NOT do ('retrieves configuration rather than executing their data queries').

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