Skip to main content
Glama

encode_asn1_data

Encodes an ASN.1 value string into hex or base64 encoded binary data according to the provided schema definition, ASN.1 type name, and encoding rule (DER by default).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "schemaContent": "<schemaContent>",
      "typeName": "<typeName>",
      "value": "<value>"
    },
    "name": "encode_asn1_data"
  }
}

Input Schema

NameRequiredDescriptionDefault
codecNoThe ASN.1 encoding rule to use for encoding. Valid options include 'DER', 'BER', 'PER', 'UPER' or 'CUPER', 'OER' or 'COER', 'JER', 'XML or 'XER' or 'EXER'. Defaults to 'DER'.DER
valueYesThe ASN.1 value string to be encoded (e.g., in ASN.1 value notation).
userIdNoThe user's email address to look up the asn1.io user account. If unknown, pass an empty string.
fileNameNoThe name of the schema file. This should end in '.asn' (e.g., 'Rocket.asn'). If not provided, defaults to 'schema.asn'.schema.asn
typeNameYesThe ASN.1 type name (PDU) to encode (e.g., 'Rocket').
dataFormatNoDesired format of the output encoded data: 'hex' or 'base64'. Defaults to 'hex'.hex
schemaContentYesPlain-text ASN.1 schema definition. This must be valid ASN.1 syntax, typically starting with the 'DEFINITIONS' keyword and concluding with 'END'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full burden; it usefully discloses the default encoding rule (DER) and the output format options. However, it omits failure behavior (e.g., invalid ASN.1 syntax), and does not explain the account-lookup implication of the userId parameter or whether any state is persisted server-side.

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?

A single front-loaded sentence that names the operation, the inputs that drive it, the output forms, and the default rule with zero filler. Nothing could be cut without losing information.

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?

For a seven-parameter tool with no output schema, the description adequately covers the core inputs and the shape of the result (hex/base64 encoded data). Minor gaps remain around the optional userId/fileName parameters and error conditions, though the schema covers those fields.

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%, so the schema already explains all seven parameters including the codec options and dataFormat values. The description only restates the codec default and output format, adding no syntax or format details beyond the schema.

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?

The description gives a specific verb ('Encodes') and resource ('an ASN.1 value string') plus the exact output forms (hex or base64 binary). It implicitly contrasts with the decode sibling through the verb alone, but never names decode_asn1_data explicitly.

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?

The encode operation is self-evident from the verb, and the listed inputs (schema, type name, value) sketch the required workflow, but there is no explicit when-to-use vs. when-not guidance and no mention of the sibling decode_asn1_data or compile_asn1_schema as prerequisites.

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.

Resources