Skip to main content
Glama
Augmented-Nature

Unofficial PubChem MCP Server

get_assay_info

Retrieve detailed bioassay data from PubChem using the Assay ID to access experimental protocols, results, and chemical activity information.

Instructions

Get detailed information for a specific bioassay by AID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aidYesPubChem Assay ID (AID)

Implementation Reference

  • The handler function that implements the core logic of the 'get_assay_info' tool. It makes an API call to PubChem's assay endpoint using the provided AID and returns the formatted JSON response or throws an error.
    private async handleGetAssayInfo(args: any) {
      try {
        const response = await this.apiClient.get(`/assay/aid/${args.aid}/JSON`);
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(response.data, null, 2),
            },
          ],
        };
      } catch (error) {
        throw new McpError(
          ErrorCode.InternalError,
          `Failed to get assay info: ${error instanceof Error ? error.message : 'Unknown error'}`
        );
      }
    }
  • The input schema definition for the 'get_assay_info' tool, specifying that it requires a numeric 'aid' parameter (PubChem Assay ID).
    inputSchema: {
      type: 'object',
      properties: {
        aid: { type: 'number', description: 'PubChem Assay ID (AID)' },
      },
      required: ['aid'],
    },
  • src/index.ts:589-599 (registration)
    The tool registration entry in the MCP tools list, defining the name, description, and input schema for 'get_assay_info'.
    {
      name: 'get_assay_info',
      description: 'Get detailed information for a specific bioassay by AID',
      inputSchema: {
        type: 'object',
        properties: {
          aid: { type: 'number', description: 'PubChem Assay ID (AID)' },
        },
        required: ['aid'],
      },
    },
  • src/index.ts:782-783 (registration)
    The switch case in the request handler that dispatches calls to 'get_assay_info' to the appropriate handler method.
    case 'get_assay_info':
      return await this.handleGetAssayInfo(args);

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