json_to_asn1_schema
Converts a JSON message (data sample/instance) or a JSON Schema into an ASN.1 schema definition. Use this tool whenever a user asks to generate or convert JSON or JSON Schema into ASN.1.
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": {
"jsonContent": "<jsonContent>",
"inputType": "<inputType>"
},
"name": "json_to_asn1_schema"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| userId | No | The user's email address to look up the asn1.io user account. If unknown, pass an empty string. | |
| inputType | Yes | Specifies whether jsonContent is a JSON data message or a JSON Schema. Must be either 'message' (for a JSON data instance/sample) or 'schema' (for a JSON Schema). | |
| jsonContent | Yes | The JSON content to convert (either a JSON message/data instance or a JSON Schema document). | |
| makeExtensible | No | Make generated ASN.1 objects extensible (adds ASN.1 extension marker '...' to SEQUENCE/CHOICE for 'message', or allows extensibility instead of forcing additionalProperties:false for 'schema'). Defaults to false. | |
| generateDefaults | No | Generate DEFAULT values for primitive types in the ASN.1 schema (applicable when inputType is 'message'). Defaults to false. |