Skip to main content
Glama

CipherHUB Cryptography Toolkit

cose_sign1_parse

Read-only

[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] 布局。

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": "cose_sign1_parse"
  }
}

Input 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?

The annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered. The description adds substantive behavior beyond the annotations: payload is tentatively CBOR-decoded, the 128KB input cap, the signature_format_note explains raw r||s semantics, and structure_tree is documented as isomorphic to cbor_decode's output. The fact that parsing never verifies is the key behavioral caveat and is stated up front.

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?

Bracketed section headers (【算法】【参数】【输出】【注意】) make it easy to scan, and the single most important fact (parse only, no verification) is front-loaded in the first sentence. The output-field enumeration is long but earns its place given there is no output schema; a few parenthetical notes could be tightened.

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 one optional parameter and no output schema, the description carries the full disclosure burden and does so: it explains input size/format, the four-element CBOR layout, every returned field including payload_json/payload_decoded and signature_format_note, and how structure_tree relates to cbor_decode output. Nothing material is missing for correct invocation or interpretation.

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 entry already says the input is a hex string of ≤128KB forming a 4-element array. The description's 【参数】 block largely restates those constraints. It adds only marginal interpretive value beyond the structured field, 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 description opens with a specific verb+resource combination: '纯拆解 COSE_Sign1 消息' (purely decompose a COSE_Sign1 message) and cites RFC 9052 §4.2. The clause '不验签' explicitly distinguishes it from the sibling cose_sign1_verify, so an agent can choose between them without opening either 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?

'纯拆解…不验签' states a clear exclusion: this tool structures the message without checking the signature, implying that cose_sign1_verify is the tool to use when verification is needed. The alternative is implied by negation rather than named, and there is no description of when the input is malformed, but the usage boundary is unambiguous.

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.