Skip to main content
Glama

CipherHUB Cryptography Toolkit

asn1_parse

[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 回包等非规范编码的卖点。

Input Schema

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/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 handles it well. It discloses tolerated encoding variants (indefinite length, segmented octet strings, high tag numbers), the single-root/byte-closed requirement, and the important caveat that der_conformant is only a walker-level approximation, not a complete X.690 DER validator. It also lists truncated and warnings as possible outputs.

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 organized into clear sections (purpose, algorithm, parameters, output, notes) and front-loads the main purpose in the first sentence. Every section carries technically relevant information for invoking the tool, with no filler or repetition beyond the schema.

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?

Because there is no output schema, the description compensates by enumerating the output fields, including structure_tree subfields, and by explaining the der_conformant approximation and BER feature list. It could be slightly more explicit about requiredness/error behavior for invalid or empty input, but for a single-parameter parser it is largely complete.

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%, and the schema already documents asn1_in_hex as a hex string with size and tolerance constraints. The description's parameter section essentially repeats that information without adding new meaning, so the baseline 3 applies.

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 opening sentence states a specific action and resource: dissect any ASN.1/BER bytes into a TLV structure and produce a per-node tree plus a DER verdict per X.690. This clearly distinguishes it from siblings such as der_encode or cert_parse because the focus is generic ASN.1/BER parsing, not encoding or certificate-specific parsing.

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 description gives clear usage context: it is for arbitrary ASN.1/BER hex input and explicitly markets BER feature detection for non-standard encodings such as AWS KMS responses. However, it does not explicitly name sibling alternatives or state when not to use this tool, so it stops short of full when/when-not 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.