Skip to main content
Glama
Augmented-Nature

Unofficial PubChem MCP Server

substructure_search

Search PubChem's chemical database to find compounds containing specific molecular substructures 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. Currently implemented as a placeholder that returns a 'not yet implemented' message.
    private async handleSubstructureSearch(args: any) {
      return { content: [{ type: 'text', text: JSON.stringify({ message: 'Substructure search not yet implemented', args }, null, 2) }] };
    }
  • Input schema definition for the 'substructure_search' tool, specifying SMILES query and optional max_records.
    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)
    Dispatch/registration in the main request handler switch statement that routes calls to the substructure_search handler.
    case 'substructure_search':
      return await this.handleSubstructureSearch(args);
  • src/index.ts:454-465 (registration)
    Tool object registration in the tools array passed to setTools, including name, description, and schema.
    {
      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'],
      },
    },
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states what the tool does but doesn't describe important behavioral aspects: whether this is a read-only operation, what happens when no matches are found, performance characteristics, rate limits, authentication requirements, or what the output format looks like. For a search tool with no annotation coverage, this is a significant gap.

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, efficient sentence that states the core purpose without unnecessary words. It's appropriately sized for a straightforward search tool and front-loads the essential information. Every word earns its place.

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?

For a search tool with no annotations and no output schema, the description is incomplete. It doesn't explain what the tool returns (compounds list, structures, IDs?), how results are ordered, pagination behavior, or error conditions. Given the complexity of chemical searching and the lack of structured output information, the description should provide more context about the operation's behavior and results.

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 schema already documents both parameters thoroughly. The description doesn't add any parameter semantics beyond what's in the schema - it mentions 'specific substructure' which aligns with the 'smiles' parameter but provides no additional context about SMILES format requirements, validation, or search behavior. Baseline 3 is appropriate when the schema does the heavy lifting.

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: 'Find compounds containing a specific substructure' - a specific verb ('Find') and resource ('compounds') with the operation ('containing a specific substructure'). It distinguishes from siblings like 'search_compounds' (general search) and 'search_similar_compounds' (similarity-based), but doesn't explicitly differentiate from 'superstructure_search' (which finds compounds where the query is a superstructure).

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 when substructure search is appropriate compared to other search methods like 'search_by_smiles' (exact match), 'search_similar_compounds' (similarity-based), or 'superstructure_search' (inverse relationship). No context about use cases or exclusions is provided.

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/Augmented-Nature/Augmented-Nature-PubChem-MCP-Server'

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