Skip to main content
Glama

jflap_convert_model

Convert JFLAP models across formalisms: FSA to regular expression or regular grammar, regular grammar to FSA, and CFG to PDA or PDA to CFG for formal-language analysis and transformation.

Instructions

Perform cross-formalism conversion: FSA to Regular Expression ('fsa_to_re'), FSA to Regular Grammar ('fsa_to_rg'), Regular Grammar to FSA ('rg_to_fsa'), CFG to PDA ('cfg_to_pda'), or PDA to CFG ('pda_to_cfg').

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": {
      "conversion": "<conversion>",
      "input_file": "<input_file>"
    },
    "name": "jflap_convert_model"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNoLL or LR mode for cfg_to_pda (default 'll')
conversionYesType of conversion
input_fileYesInput model .jff file
output_fileNoDestination model .jff file (optional for fsa_to_re)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.3/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full burden of behavioral disclosure. It never states that the tool reads and writes .jff files, whether an existing output_file is overwritten, what happens on invalid input, or where the regular-expression result of fsa_to_re ends up — all material for a file-mutating conversion tool.

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 states the operation and then lists every valid value, with zero filler. Each clause maps directly to a required decision the caller must make.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no annotations and no output schema, the definition should describe side effects and return behavior, especially for fsa_to_re where no model file is produced. The conversion catalog is complete, but the outcome of a call is left unspecified.

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%, so every parameter already carries its own description and both enums are self-documenting. The description adds essentially nothing beyond restating the enum tokens, so the baseline 3 applies.

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 names a specific verb (cross-formalism conversion) and enumerates every supported resource pair with the exact enum tokens (fsa_to_re, cfg_to_pda, etc.), so an agent knows precisely what this tool performs. It stops short of distinguishing itself from sibling jflap_fsa_operation or jflap_grammar_operation, which could plausibly overlap.

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?

Usage is implied through the enumeration of available conversions: an agent infers it calls this tool when it needs to translate a model from one formalism to another. There is no explicit when-to-use statement, no mention of prerequisites, and no guidance on when to choose this over the sibling operation tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.