compile_asn1_schema
Compiles ASN.1 schema definitions into executable source code. Use this tool whenever a user asks to generate code, compile an ASN.1 schema, or create a codec (e.g., DER, PER, UPER, BER) for a specific programming language. The tool returns the compilation status, error messages, and files containing the generated source code.
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": "compile_asn1_schema"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| codec | No | The ASN.1 encoding rules to support in the generated code. Valid options include 'uper', 'per', 'der', 'ber', or 'oer'. If the user does not specify a codec, default to 'der'. | der |
| userId | No | The user's email address to look up the asn1.io user account. If the user's identity is unknown, pass an empty string. | |
| fileName | No | The name of the schema file being compiled. This should end in '.asn' (e.g., 'Rocket.asn'). If the user does not provide a filename, invent a logical one based on the schema's main module name. It is used for errors to reference a specific location in the schema . | schema.asn |
| schemaContent | No | Plain-text ASN.1 schema definition. This must be valid ASN.1 syntax, typically starting with the 'DEFINITIONS' keyword and concluding with 'END'. | |
| targetLanguage | No | The target programming language for the generated code. Allowed values include 'python' and ‘rust’. Infer this from the user's prompt. If not specified, ask the user before calling the tool. | python |