Skip to main content
Glama

parse_reaction

Convert reaction files (CDXML, CDX, RXN, CSV) into a structured JSON descriptor with roles, SMILES, and conditions for downstream analysis.

Instructions

Parse reaction files into a semantic JSON descriptor.

Extracts every species with canonical SMILES, role classification (using Schneider fingerprint scoring for reactant/reagent binary, plus curated database for semantic roles like base/solvent/catalyst), display names, equivalents, mass data, and adducts. Produces a single JSON source of truth suitable for summarize_reaction, render_scheme, or LCMS analysis.

Provide at least one file path. Multiple may be combined (e.g. cdxml + csv) to merge structural data with ELN metadata.

Args: cdxml: Path to a .cdxml reaction file. cdx: Path to a .cdx reaction file (converted internally). csv: Path to a Findmolecule ELN CSV export. rxn: Path to a .rxn file. input_dir: Directory containing experiment files (auto-discovers cdxml/cdx/csv/rxn by experiment ID). output_path: If given, write the result JSON to this file and return {ok, output_path} instead of the full dict.

Returns: Reaction descriptor dict with keys: version, experiment, input_files, reaction_smiles, reaction_class, species (list with role, smiles, formula, mw, etc.), conditions, and eln_data. When output_path is provided, returns {ok, output_path} instead.

Safety override: Parse a reaction and atomically publish its JSON descriptor.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cdxNo
csvNo
rxnNo
cdxmlNo
input_dirNo
output_pathNo
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses the parsing algorithm (Schneider fingerprint scoring, curated database), output structure, and the output_path behavior (returns {ok, output_path}). However, the trailing 'Safety override: Parse a reaction and atomically publish its JSON descriptor' is ambiguous — it does not clarify what 'publish' means or whether there are side effects beyond writing to a file. Still, overall transparency is high.

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?

The description is well-organized: purpose, extraction detail, usage, args, returns, and a final note. Most sentences are information-dense. The 'Safety override' line appears misplaced and unclear, adding noise without clear value, which prevents a 5. Minor redundancy, but overall structured and front-loaded.

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?

Given six parameters, no annotations, and no output schema, the description provides everything needed: required input (at least one file), optional file combination, full output schema (keys), return behavior when output_path is set, and even references to dependent tools. No critical usage context is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description fully compensates. Each of the six parameters is individually documented with specific behavior (e.g., 'cdx: Path to a .cdx reaction file (converted internally)'), and it explains how multiple parameters can be combined and how input_dir auto-discovers files. This goes far beyond the bare schema.

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 states a specific verb and resource: 'Parse reaction files into a semantic JSON descriptor.' It details the output (species with SMILES, roles, etc.) and explicitly lists supported file formats, making it clear this is for reaction files, distinct from sibling parsers like parse_scheme or parse_analysis_file. The purpose is unambiguous and information-rich.

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 description gives practical usage instructions (provide file paths, combine multiple formats) and notes the output is suitable for downstream tools, but does not explicitly contrast this tool with siblings. It does not state when to prefer parse_reaction over parse_scheme or parse_analysis_file, leaving selection to implication. Adequate but not explicit.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ZiChenWang114514/cdxml-toolkit-community'

If you have feedback or need assistance with the MCP directory API, please join our Discord server