Skip to main content
Glama

cos_metric_record

Record agent performance metrics after task completion, capturing outcome and agent type along with optional task, model, and duration details for observability.

Instructions

Record a single agent performance metric after task completion.

Args: agent_type: Type of agent (e.g. "general", "planner", "code-reviewer"). outcome: Result — one of: success, rework, partial, blocked. task_id: Task identifier (e.g. "TASK-143"). Optional. model: Model used (e.g. "sonnet", "opus"). Optional. duration_ms: Duration in milliseconds. Optional. domain: Task domain (e.g. "BACKEND", "FRONTEND", "INFRA"). Optional. complexity: Cynefin classification (e.g. "CLEAR", "COMPLICATED"). Optional.

Returns: str: JSON with inserted row id and status.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelNo
domainNo
outcomeYes
task_idNo
agent_typeYes
complexityNo
duration_msNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

Annotations (readOnlyHint: false, idempotentHint: false) already imply a non-read, non-idempotent operation, and the description's 'Record' aligns with this. The description adds a return-value note but does not disclose potential side effects, duplication behavior, or permission requirements beyond the basic write implication.

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 well-structured with an opening purpose statement, a labeled Args block, and a Returns block. Every sentence serves a purpose, and the format is scannable and front-loaded with the primary action.

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 tool with 7 parameters and an output schema, the description gives comprehensive parameter semantics and return value information. It covers all required and optional fields with examples, making it fully adequate for an agent to invoke the tool correctly without additional context.

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%, and the description fully compensates by explaining every parameter with type, optionality, and examples. It explicitly enumerates valid outcome values (success, rework, partial, blocked), provides agent_type examples, and clarifies units for duration_ms, adding significant meaning beyond the bare schema.

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 'Record a single agent performance metric after task completion,' using a specific verb and resource with a clear trigger. This differentiates it from sibling tools like cos_metric_query and cos_metric_trend, which are for retrieval and trends.

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?

The phrase 'after task completion' provides a clear context for when to use this tool, establishing a usage trigger. However, it does not explicitly mention alternatives or when not to use it, such as pointing to cos_metric_query for reading metrics, so it misses explicit exclusions.

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