Skip to main content
Glama

search_compound

Search reaction JSON files for a SMILES compound, returning exact and similar matches above a Tanimoto threshold to locate related experiments or confirm prior synthesis.

Instructions

Search for a compound across experiment JSON files by SMILES similarity.

Scans a directory of reaction JSON files (from parse_reaction) and returns exact matches and structurally similar compounds above the given Tanimoto threshold. Useful for finding related experiments, checking if a compound has been made before, or tracing a compound through a multi-step synthesis.

This module is under active development. If unavailable, the tool returns a graceful error rather than crashing.

Args: smiles: SMILES string of the compound to search for. Use resolve_name to get a validated SMILES first. experiment_dir: Directory containing reaction JSON files to search. similarity_threshold: Tanimoto similarity cutoff (0–1). Default 0.85.

Returns: Dict with keys: ok, query_smiles, exact_matches (list), similar_matches (list with similarity scores), total_files_searched. Returns {ok: False, error: "..."} if module unavailable or search fails.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
smilesYes
experiment_dirYes
similarity_thresholdNo
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses that the module is under active development and returns a graceful error if unavailable, and it details the return dict structure. However, it doesn't explicitly state that the operation is read-only or describe any side effects. For a search tool, this is adequate but not exhaustive.

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-structured with Args and Returns sections, and the main purpose is front-loaded in the first sentence. It's longer than strictly necessary but each part earns its place—no filler or repetition. The structure aids quick scanning.

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?

There is no output schema, so the description explains the return keys and error handling. It mentions the prerequisite of using resolve_name and the scanning behavior. It covers what an agent needs to make the call correctly. It could elaborate on the structure of match lists, but that's a minor gap.

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 description coverage is 0%, so the description fully compensates by explaining each parameter in the Args section. It clarifies the format of smiles, the role of experiment_dir, and the semantics/default of similarity_threshold (Tanimoto cutoff, 0–1, default 0.85). This goes well beyond the raw 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 clearly states the verb and resource: 'Search for a compound across experiment JSON files by SMILES similarity.' It also specifies the mechanism (Tanimoto threshold) and distinguishes itself from siblings like compare_molecules by focusing on scanning a directory of JSON files. Though it doesn't explicitly name alternatives, the purpose is unambiguous and specific.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit use cases: 'finding related experiments, checking if a compound has been made before, or tracing a compound through a multi-step synthesis.' It also advises using resolve_name to get a validated SMILES first, which is actionable guidance. It doesn't state when not to use it or name alternatives, but the context is clear enough.

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