Skip to main content
Glama

CipherHUB Cryptography Toolkit

cose_sign1_parse

[cose_sign1] 纯拆解 COSE_Sign1 消息,不验签(RFC 9052 §4.2)。 【算法】CBOR 四元素数组 [protected, unprotected, payload, signature] 逐字段拆解;protected 头解码出 alg;payload 尝试嵌套 CBOR 解码。 【参数】

  • cose_sign1_in_hex:COSE_Sign1 消息(≤128KB,hex) 【输出】protected_in_hex、protected_header、unprotected_header、 payload_in_hex、payload_json、payload_decoded、signature_raw_in_hex、 signature_format_note(裸 r||s 语义说明)、structure_tree。 【注意】structure_tree 与 cbor_decode 同构(offset/major_type/length_form/ rfc_note),四元素数组在树中可见 [protected, {}, payload, sig] 布局。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cose_sign1_in_hexNoCOSE_Sign1 消息的十六进制字符串(≤128KB,4 元素数组)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses that no signature verification occurs, that the payload undergoes a nested CBOR decode attempt, the ≤128KB input cap, and even a signature_format_note about raw r||s semantics. It could still say more about malformed-input error behavior, but the behavioral profile is unusually well covered.

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?

Organized into labeled sections (算法/参数/输出/注意) with the core purpose front-loaded, and the enumerated output fields are useful. Slightly dense with some redundant restatement of the 4-element-array layout, but no padding.

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?

No output schema exists, and the description fully enumerates the return fields (protected_header, payload_json, structure_tree, etc.), explains the decoding algorithm, and flags the cbor_decode isomorphism. An agent has everything needed to call and interpret this 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 100% and the single parameter's meaning (hex COSE_Sign1, 4-element array) is already documented in the schema. The description restates the ≤128KB constraint rather than adding new syntax, so this is the baseline 3.

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?

States a specific verb (拆解/parse) and resource (COSE_Sign1 message), and immediately scopes it by distinguishing from verification ('不验签'). An agent can tell this apart from cose_sign1_verify and cose_sign1_sign without opening any schema.

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 '不验签' framing plus the note that structure_tree is isomorphic with cbor_decode gives clear context for when this is the right tool versus cose_sign1_verify. There is no explicit when-not statement or a direct routing sentence naming the verify sibling, so it stops short of a 5.

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.