Skip to main content
Glama
Augmented-Nature

PubChem MCP Server

substructure_search

Identify compounds with a specific chemical substructure using SMILES string input and retrieve relevant results from PubChem’s extensive database.

Instructions

Find compounds containing a specific substructure

Input Schema

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

Implementation Reference

  • The handler function that executes the substructure_search tool logic. Currently a placeholder implementation returning 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.
    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:454-465 (registration)
    Registration of the substructure_search tool in the ListToolsRequestSchema response.
    {
      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 case in the CallToolRequestSchema handler that routes 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 what the tool does but lacks critical details such as whether this is a read-only operation, potential rate limits, authentication requirements, or what the output format looks like (e.g., list of compounds, error handling). 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 directly states the tool's purpose without any fluff or redundant information. It is appropriately sized and front-loaded, making it easy for an agent to parse quickly.

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?

Given the complexity (a search tool with 2 parameters), no annotations, and no output schema, the description is minimally adequate. It covers the basic purpose but lacks details on behavior, output, and usage context. With no output schema, the agent is left uncertain about return values, which reduces completeness for effective tool invocation.

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%, with clear documentation for both parameters (SMILES string and max_records). The description adds no additional meaning beyond the schema, such as explaining what a 'substructure' means in this context or providing examples. Baseline 3 is appropriate since 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 verb 'Find' and the resource 'compounds containing a specific substructure', which is specific and actionable. However, it does not explicitly differentiate from sibling tools like 'search_compounds' or 'superstructure_search', which appear related but have different purposes.

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. With sibling tools like 'search_compounds' and 'superstructure_search' present, there is no indication of the specific context or scenarios where substructure_search is preferred, leaving the agent to guess based on tool names alone.

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

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

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