Skip to main content
Glama

List Agent Tool Usage

list_agent_tool_usage
Read-only

For one agent over the last hours (default 168, at most 720), every tool its LLM calls offered (listed among the tool definitions), with how many sessions were offered it (sessions_offered), how many of those called it at least once (sessions_called), and usage_pct = sessions_called / sessions_offered * 100 to one decimal. never_used marks a tool that was offered and never called. Ordered with used tools first by usage_pct highest first (ties: more sessions offered, then tool name), and never-used tools last. tool is the matched name: lower-cased, with an MCP prefix removed, so mcp__srv__search and search are one tool; display_name is the spelling most sessions used. Sessions whose LLM calls declared no tools are unknown, not tool-less: they count toward neither number, and sessions_with_tool_definitions says how many sessions the figures rest on. Each tool lists up to 5 skipped_session_ids, newest first: sessions that were offered it and did not call it. Two bounds apply. The window is at most 720 hours. Example sessions are looked up for only the first 30 tools in the response order that have any skipping session; later tools show skipped_session_ids [] although sessions_called is below sessions_offered. An agent with no such sessions answers 200 with tools [] (an agent name is not a registry entry).

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": {
      "workspaceID": "<workspaceID>",
      "agentName": "<agentName>"
    },
    "name": "list_agent_tool_usage"
  }
}

Input Schema

NameRequiredDescriptionDefault
hoursNoHow far back to look, in hours: the window is the last <hours> hours up to now. Default 168 (7 days), at most 720 (30 days)
agentNameYesThe agent's name as it appears on its spans
workspaceIDYes

Output Schema

NameRequiredDescriptionDefault
hoursYesThe window that was read, in hours
toolsYesEvery tool offered to the agent in the window, ordered: tools that were used before tools that never were, then by usage_pct highest first, then by sessions_offered highest first, then by tool name. [] when none was offered
$schemaNoA URL to the JSON Schema for this object.
agent_nameYesThe agent asked about, as given
sessions_with_tool_definitionsYesHow many of the agent's sessions in the window declared tools on any LLM call. Sessions that declared none are unknown, not tool-less, and are counted nowhere in this response. 0 for an agent with no such session, including one that never reported anything

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. Added
  4. Removed
  5. Added
  6. Removed
  7. Added
  8. Removed
  9. Added
  10. Removed
  11. Added

TDQS

A3.8/5.0
Behavior5/5

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

Annotations only declare readOnlyHint=true and openWorldHint=false; the description goes far beyond them. It discloses the aggregation formula (usage_pct = sessions_called/sessions_offered*100), the exact ordering and tie-break rules, two explicit truncation bounds (5 skipped_session_ids per tool, example lookups only for the first 30 qualifying tools), the 'unknown vs tool-less' session caveat, and the 200-with-empty-array behavior when the agent has no sessions.

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?

There is essentially no filler — every clause carries information about metrics, ordering, or truncation. However it is delivered as a single dense block with metric definitions front-loaded ahead of the core purpose, which makes it hard to scan; the caveat paragraphs about the 30-tool and 5-session bounds could be structurally separated.

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, single-agent aggregation over a bounded window, the description covers ordering, truncation, edge cases, and empty results thoroughly. Much of the field-by-field explanation duplicates the existing output schema, while the one real gap is workspaceID and any advice on routing to an alternative tool.

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

Parameters3/5

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

Schema coverage is 67%, with hours and agentName already documented in the schema; the description restates the 168 default and 720 maximum without adding much beyond it. It does implicitly clarify agentName semantics ('an agent name is not a registry entry'), but workspaceID is left unexplained in both schema and description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening clause states a precise verb and resource: for one agent over a bounded window, list every tool its LLM calls offered, with per-tool session counts. The scope (single agent, hour window) is unambiguous enough to separate it from trace-oriented siblings like list_agent_traces, but no sibling is named or contrasted, and the purpose sentence is buried under metric definitions.

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?

Usage context is only implied: an agent wanting tool-adoption/adoption-gap stats for one named agent. There is no explicit when-to-use or when-not-to-use statement, and no pointer to alternatives for related questions (e.g. traces or spans). The window default and 720-hour ceiling are the closest thing to usage guidance.

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.