Skip to main content
Glama

substructure_search

Search PubChem's chemical database to identify compounds containing a specific molecular substructure using SMILES notation.

Instructions

Find compounds containing a specific substructure

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
smilesYesSMILES string of the substructure query
max_recordsNoMaximum number of results (1-10000, default: 100)

Implementation Reference

  • The handler function for the 'substructure_search' tool. It is a placeholder implementation that returns a message indicating it is not yet implemented.
    private async handleSubstructureSearch(args: any) {
      return { content: [{ type: 'text', text: JSON.stringify({ message: 'Substructure search not yet implemented', args }, null, 2) }] };
    }
  • The tool schema definition including name, description, and input schema for 'substructure_search'.
    {
      name: 'substructure_search',
      description: 'Find compounds containing a specific substructure',
      inputSchema: {
        type: 'object',
        properties: {
          smiles: { type: 'string', description: 'SMILES string of the substructure query' },
          max_records: { type: 'number', description: 'Maximum number of results (1-10000, default: 100)', minimum: 1, maximum: 10000 },
        },
        required: ['smiles'],
      },
    },
  • src/index.ts:756-757 (registration)
    The switch case in the request handler that dispatches calls to the 'substructure_search' handler function.
    case 'substructure_search':
      return await this.handleSubstructureSearch(args);
Behavior2/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 of behavioral disclosure. It states the tool 'finds' compounds, implying a read operation, but doesn't cover aspects like performance (e.g., speed, timeouts), result format (e.g., list of compounds with details), or limitations (e.g., database scope, partial matches). This is inadequate for a search tool with no annotation support.

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?

The description is a single, clear sentence with zero wasted words. It's front-loaded with the core purpose, making it highly efficient and easy to parse.

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

Completeness2/5

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

Given the complexity of a substructure search (which can involve nuanced matching and result handling), no annotations, and no output schema, the description is insufficient. It doesn't explain what 'containing' means (e.g., partial matches, stereochemistry handling), the result format, or any error conditions, leaving significant gaps for agent usage.

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 description coverage is 100%, so the input schema fully documents both parameters (SMILES string and max_records with constraints). The description adds no parameter-specific information beyond implying the 'smiles' parameter is for substructure queries, which is already clear from the schema. This meets the baseline for high schema coverage.

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 tool's purpose with a specific verb ('Find') and resource ('compounds containing a specific substructure'), making it immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'search_by_smiles' or 'search_similar_compounds', which might also involve SMILES queries, so it doesn't reach the highest score.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'search_by_smiles' (which might search for exact matches) or 'search_similar_compounds' (which might use similarity metrics), leaving the agent without context for tool selection.

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/k-lordbodin7/PubChem-MCP-Server'

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