Skip to main content
Glama

get_cost_over_time

Reads the LLM cost of the workspace, or of one pipeline, per UTC day.

Instructions

Reads the LLM cost of the workspace, or of one pipeline, per UTC day.

Use this to see how spending developed, find the day a cost spike started, or compare periods. Costs are in USD. There is one point per day with usage; days without usage are left out, so a missing day means zero cost. A cost_total of null means that day had usage but none of it was priced. Without dates the range is the last 30 days. start_date is inclusive and end_date exclusive. The daily figures leave out unpriced LLM calls; use get_cost_totals to check whether the cost is complete. :param pipeline_name: Restrict to this pipeline. Omit for the whole workspace. Needs Pipelines read as well as Costs read. :param start_date: Inclusive start as an ISO timestamp. Defaults to 30 days before end_date. :param end_date: Exclusive end as an ISO timestamp. Defaults to no upper bound. :returns: The daily cost, or an error message.

The output is automatically stored and can be referenced in other functions. Returns a formatted preview with an object ID (e.g., @obj_123). Use the object store tools in combination with the object ID to view nested properties of the object. Use the returned object ID to pass this result to other functions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
end_dateNo
start_dateNo
pipeline_nameNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.31

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so well: it discloses that days without usage are omitted (missing day = zero cost), that cost_total null means usage existed but was unpriced, that unpriced calls are excluded from daily figures, and that pipeline_name requires Pipelines read plus Costs read.

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?

Front-loaded with purpose then semantics; each sentence about dates, nulls, and defaults earns its place. The trailing object-store boilerplate ('output is automatically stored... @obj_123... use the object store tools') is generic filler that dilutes an otherwise tight description.

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?

No output schema or annotations exist, so the description must cover behavior and returns; it does, explaining the per-day return shape, null semantics, exclusions, date defaults, and permission requirements. An agent has everything needed to call this correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, yet all three parameters are documented: pipeline_name's scope and permission requirement, start_date as an inclusive ISO timestamp defaulting to 30 days before end_date, and end_date as exclusive with no default upper bound. This fully compensates for the empty schema descriptions.

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 (reads) and resource (LLM cost) with an explicit granularity (per UTC day) and scope option (workspace or one pipeline). This is clearly distinguishable from siblings like get_cost_totals (completeness check) and get_cost_breakdown (dimensional split).

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?

Gives three concrete when-to-use cases (track spending over time, locate a spike's start day, compare periods) and routes the agent to get_cost_totals for verifying cost completeness. There is no explicit when-not guidance or contrast with get_cost_breakdown, so it falls short of a full 5.

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