Skip to main content
Glama
Johnhyeon

StockLens

by Johnhyeon

get_metrics_summary

Read-onlyIdempotent

Summarize MCP tool usage metrics for the last N days to debug and optimize performance. See call counts, execution times, token usage, cache hit rates, and error counts per tool.

Instructions

사용량통계 — 최근 N일간 MCP 도구 사용량을 집계해서 보여줍니다.

디버깅/최적화용. 도구별로:

  • 호출 횟수

  • 평균/p50/p95 실행 시간

  • 평균 토큰 소모량

  • 캐시 히트율

  • 에러 발생 횟수 를 보여줍니다.

로그 파일 위치: ~/.stocklens/logs/metrics_YYYYMMDD.jsonl (2026-08 이전 기록은 ~/Downloads/kstock/logs/ 에 있고, 그것도 같이 읽습니다)

Args: days: 조회할 일수 (기본 1, 오늘만. 최대 30)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
daysNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.1.3
    • removedInput schema / properties / days / default
      Removed value: -1
  2. First observedv0.4.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already establish read-only, idempotent, non-destructive behaviorikuha. The description adds valuable context beyond annotations: it reads from local log files, includes legacy logs from a second directory, and aggregates per-tool statistics. This meaningfully enriches behavioral understanding.

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: a one-line purpose, a short usage context, a focused bullet list of output metrics, relevant log-file details, and a clear parameter explanation. Every sentence adds necessary information without redundancy.

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?

The description is complete for a single-parameter read-only metrics tool. It explains what will be returned (metric categories), where the data comes from, how the sole parameter behaves, and its limits. An output schema exists, so the exact return shape need not be spelled out.

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% and the schema only says 'days' is an integer. The description compensates fully by defining the units (days), default value (1, meaning today only), and maximum (30). This is exactly the parameter-level guidance an agent needs.

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 states a specific verb and resource: it aggregates and displays MCP tool usage statistics for recent N days. The bullet list of metric types (call count, latencies, tokens, cache hit rate, errors) makes the tool's purpose unmistakable and distinct from all sibling tools, none of which are usage metrics.

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?

It explicitly identifies the intended context as debugging/optimization, giving the agent a clear when-to-use signal. It doesn't name alternatives, but there are no obvious sibling tools serving the same purpose, so exclusions are less necessary.

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