Skip to main content
Glama

CipherHUB Cryptography Toolkit

asn1_parse

Read-only

[structured_message] 解剖任意 ASN.1/BER 字节的 TLV 结构,给出逐节点拆解树与 DER 判定(X.690)。 【算法】ASN.1 显微镜:定长(§8.1.3.3-5)/不定长 BER(§8.1.3.6,0x80+EOC)/ 分段八位串(§8.7)/高 tag 号(§8.1.2.4)均容忍;要求单根逐字节闭合。 【参数】

  • asn1_in_hex:ASN.1/BER 字节的十六进制字符串(1B~128KB) 【输出】der_conformant、ber_features(walker 检出的 BER 特征清单)、 node_count、total_length、structure_tree(offset/header_len/total_len/ tag_hex/tag_number/class/constructed/length_form/value_hint/rfc_note)、 truncated、warnings。 【注意】der_conformant 是 walker 口径的近似(特征清单为空即判真), 非完整 X.690 DER 校验器;BER 特征是识别 AWS KMS 回包等非规范编码的卖点。

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "asn1_parse"
  }
}

Input Schema

NameRequiredDescriptionDefault
asn1_in_hexNoASN.1/BER 字节的十六进制字符串(1B~128KB,单根且逐字节闭合;BER 不定长/分段八位串/高 tag 号均容忍)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, but the description goes well beyond them: it enumerates the parsing algorithm's tolerances (§8.1.3.3-5, §8.1.3.6, §8.7, §8.1.2.4), the single-root/byte-closed precondition, and — most valuable — the honest caveat that der_conformant is a walker-level approximation, not a full X.690 validator. Only the failure mode for malformed hex input is left unstated.

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 labeled sections (algorithm / parameters / output / caveat) front-load the purpose and make scanning easy, and nearly every line carries real information. Minor waste comes from the parameter line duplicating the schema description almost verbatim.

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?

With no output schema, the description carries the return-value burden itself and does so thoroughly: der_conformant, ber_features, node_count, total_length, the per-node fields of structure_tree, truncated, and warnings. Combined with the algorithm notes and the approximation caveat, an agent has enough to call and interpret results correctly.

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 description coverage is 100% for the single parameter, so the schema already documents asn1_in_hex including the 1B~128KB range and single-root requirement. The description's 【参数】 block restates exactly that without adding syntax, encoding, or error-handling detail beyond the schema, so baseline 3 applies.

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?

Uses a specific verb+resource: dissect arbitrary ASN.1/BER byte strings into a per-node TLV tree plus a DER (X.690) determination. That is far more precise than a tautology, but it never names or contrasts a sibling (e.g. der_encode, cert_parse), so the agent must infer when this tool is the right entry point.

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?

Implied usage exists: it accepts arbitrary bytes, tolerates indefinite length, segmented octet strings, and high tag numbers, and the 【注意】 block hints that the BER-feature list is the selling point for spotting non-canonical encodings such as AWS KMS responses. There is no explicit when-to-use/when-not-to-use statement and no named alternative for canonical-encoding or certificate-structured input.

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.