Skip to main content
Glama

hsm_analyze_discovery_log

Analyze discovery log files from apc-hsm-proxy to map HSM commands to APC, identify existing vs missing proxy handlers, and get migration notes without AWS credentials.

Instructions

Call this when analyzing the output of apc-hsm-proxy running in discovery mode (a discovery.jsonl file). Returns per-command APC mappings, which proxy handlers already exist, which still need to be written, and migration notes. Works without AWS credentials.

IMPORTANT — handler_exists reflects _PROXY_HANDLERS in hsm_tools.py, not the apc-hsm-proxy source tree. When a handler is completed in the proxy, update _PROXY_HANDLERS in this file so handler_exists reports correctly. Until that update is committed and the MCP server restarted, handler_exists will show false even for commands that already have working handlers.

Each log line is a JSON object: vendor — "futurex_excrypt" or "thales_payshield" cmd — HSM command code, e.g. "TPIN" or "CA" params — Futurex: parameter codes → values (sensitive fields = "[REDACTED]") payload_len — Thales: observed payload length in bytes

Args: log_content: Full text of the discovery.jsonl file (newline-delimited JSON).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
log_contentYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv1.2.0

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden and meets it: it discloses the auth expectation ('Works without AWS credentials'), the redaction behavior of sensitive fields, and — critically — the IMPORTANT caveat that handler_exists reflects _PROXY_HANDLERS in hsm_tools.py, not the proxy source tree, and may be stale until an update is committed and the server restarted. That staleness gotcha is exactly the kind of non-obvious behavior an agent must know to interpret results correctly.

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?

The description is longer than average but every section earns its place: purpose is front-loaded, the critical staleness caveat is visually highlighted with IMPORTANT, and the line-format spec supports the single parameter. Minor redundancy exists between the output summary and the caveat, but nothing is wasted.

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 single-parameter analysis tool with no output schema, the description is complete: it states when to call, what to pass, what the return covers, the credential expectation, and the one behavioral trap that could mislead users. Nothing an agent needs to invoke it correctly is missing.

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 must fully compensate, and it does: it defines log_content as 'Full text of the discovery.jsonl file (newline-delimited JSON)' and additionally documents the per-line JSON object schema (vendor, cmd, params, payload_len) with examples. An agent knows exactly what to pass and what the payload looks like.

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 names a specific verb (analyze), a precise resource (apc-hsm-proxy discovery-mode output, a discovery.jsonl file), and the concrete outputs (per-command APC mappings, existing handlers, handlers needing work, migration notes). It is clearly distinguishable from siblings like hsm_analyze_code (code analysis) and hsm_get_apc_mapping (single mapping lookup) because the scope is pinned to a discovery log.

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 opening phrase 'Call this when analyzing the output of apc-hsm-proxy running in discovery mode' gives an explicit triggering condition tied to a specific artifact type. It does not name alternatives or state when not to use it, but the discovery.jsonl condition is precise enough that an agent can route correctly among the analysis siblings.

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

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/J8k3/aws-payment-cryptography-mcp'

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