Skip to main content
Glama

search_chemicals_by_name

Find chemicals by name or synonym within the SureChEMBL chemical patent database. Specify a chemical identifier and limit results for precise search outcomes.

Instructions

Search for chemicals by name, synonym, or common name

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoNumber of results to return (1-1000, default: 25)
nameYesChemical name or synonym to search for

Implementation Reference

  • Executes the tool by querying the SureChEMBL API endpoint `/chemical/name/{name}` and returns the JSON response.
    private async handleSearchChemicalsByName(args: any) { if (!args || typeof args.name !== 'string') { throw new McpError(ErrorCode.InvalidParams, 'Invalid chemical name'); } try { const response = await this.apiClient.get(`/chemical/name/${encodeURIComponent(args.name)}`); return { content: [ { type: 'text', text: JSON.stringify(response.data, null, 2), }, ], }; } catch (error) { throw new McpError( ErrorCode.InternalError, `Failed to search chemicals: ${error instanceof Error ? error.message : 'Unknown error'}` ); } }
  • Defines the input schema for the tool, specifying 'name' as required string and optional 'limit' number.
    inputSchema: { type: 'object', properties: { name: { type: 'string', description: 'Chemical name or synonym to search for' }, limit: { type: 'number', description: 'Number of results to return (1-1000, default: 25)', minimum: 1, maximum: 1000 }, }, required: ['name'], },
  • src/index.ts:388-398 (registration)
    Registers the tool in the list returned by ListToolsRequestHandler, including name, description, and input schema.
    name: 'search_chemicals_by_name', description: 'Search for chemicals by name, synonym, or common name', inputSchema: { type: 'object', properties: { name: { type: 'string', description: 'Chemical name or synonym to search for' }, limit: { type: 'number', description: 'Number of results to return (1-1000, default: 25)', minimum: 1, maximum: 1000 }, }, required: ['name'], }, },

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

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