Skip to main content
Glama

cos_metric_query

Read-onlyIdempotent

Query agent metrics with optional filters to isolate records by domain, model, outcome, and date range, returning JSON with total count and matching rows.

Instructions

Query agent metrics with optional filters.

Args: domain: Filter by domain (e.g. "BACKEND"). Optional. model: Filter by model (e.g. "sonnet"). Optional. outcome: Filter by outcome (e.g. "rework"). Optional. agent_type: Filter by agent type. Optional. date_from: Start date (ISO format, e.g. "2026-03-01"). Optional. date_to: End date (ISO format, e.g. "2026-03-25"). Optional. limit: Max rows (1-100, default 20).

Returns: str: JSON with total count and matching rows.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
modelNo
domainNo
date_toNo
outcomeNo
date_fromNo
agent_typeNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the safety profile is clear. The description adds the return format ('JSON with total count and matching rows') and limits (1-100, default 20), which are useful behavioral details beyond the annotations.

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 concise and well-structured: a one-line purpose, an Args list, and a Returns line. Each parameter gets a single line with name, explanation, and optionality. No filler.

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 read-only query tool with optional filters, the description covers the input semantics and the return format. Given an output schema exists, detailed return values need not be spelled out. It could mention filter combination semantics (e.g., AND) but overall is sufficient.

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 description coverage is 0%, so the description carries full responsibility. It documents all 7 parameters with examples, formats, and constraints (e.g., ISO dates, limit range). 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?

The description opens with 'Query agent metrics with optional filters', a specific verb+resource+scope. It clearly indicates a read-only retrieval operation, distinguishing it from sibling tools like cos_metric_record (recording metrics) and cos_metric_trend (trend analysis).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit when-to-use or alternatives are mentioned. The description implies usage for filtering raw metrics, but doesn't contrast with cos_metric_trend or cos_metric_record. There's no exclusionary guidance, so agents must infer when this tool applies.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/kouroshez/coding-os'

If you have feedback or need assistance with the MCP directory API, please join our Discord server