Skip to main content
Glama

get_cited_by

Retrieve articles that cite a specified PubMed ID to explore subsequent research.

Instructions

Find articles that cite a specific PMID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pmidYesPubMed ID
max_resultsNoMaximum citing articles to return (default: 100)

Implementation Reference

  • src/index.ts:313-333 (registration)
    Tool registration for 'get_cited_by' with inputSchema (pmid required, max_results optional)
    // Citation & Reference Tools
    {
      name: 'get_cited_by',
      description: 'Find articles that cite a specific PMID',
      inputSchema: {
        type: 'object',
        properties: {
          pmid: {
            type: 'string',
            description: 'PubMed ID'
          },
          max_results: {
            type: 'number',
            description: 'Maximum citing articles to return (default: 100)',
            minimum: 1,
            maximum: 1000
          }
        },
        required: ['pmid']
      }
    },
  • src/index.ts:470-471 (registration)
    Switch case dispatching to handleGetCitedBy handler
    case 'get_cited_by':
      return await handleGetCitedBy(args);
  • Handler function for get_cited_by - validates PMID, calls eutilsClient.getCitedBy(), returns JSON with citation count and citing PMIDs
    async function handleGetCitedBy(args: any) {
      const { pmid, max_results = 100 } = args;
    
      if (!isValidPMID(pmid)) {
        throw new Error(`Invalid PMID format: ${pmid}`);
      }
    
      const citedByPmids = await eutilsClient.getCitedBy(pmid);
      const limitedPmids = citedByPmids.slice(0, max_results);
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify({
              pmid,
              citationCount: citedByPmids.length,
              citedBy: limitedPmids
            }, null, 2)
          }
        ]
      };
    }
  • E-utilities API client method getCitedBy - calls eLink API with linkname 'pubmed_pubmed_citedin' to find citing articles
    async getCitedBy(pmid: string): Promise<string[]> {
      const result = await this.link({
        dbfrom: 'pubmed',
        db: 'pubmed',
        id: pmid,
        linkname: 'pubmed_pubmed_citedin'
      });
    
      const linkSet = result.eLinkResult?.LinkSet;
      if (!linkSet) {
        return [];
      }
    
      const linkSetDb = linkSet.LinkSetDb;
      if (!linkSetDb) {
        return [];
      }
    
      const links = linkSetDb.Link;
      if (!links) {
        return [];
      }
    
      const linkArray = Array.isArray(links) ? links : [links];
      return linkArray.map((link: any) => extractText(link.Id));
    }
Behavior2/5

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

No annotations are provided, so the description must carry the burden. It does not disclose behavioral traits such as pagination, rate limits, or what happens with no results. The tool is simple but still lacks basic transparency.

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, front-loaded sentence with no wasted words. It efficiently communicates the tool's purpose.

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 tool's low complexity (2 parameters) and no output schema, the description is acceptable but minimal. It lacks context on return format, pagination, or limits, which would help an agent use it correctly.

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 coverage is 100% with descriptions for both pmid and max_results. The description adds no additional meaning beyond the schema, meeting baseline expectations but not exceeding them.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Find articles that cite a specific PMID' clearly states the action ('find') and the resource ('articles that cite a specific PMID'). It distinctly separates from siblings like get_references, which retrieves references of an article.

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

Usage Guidelines3/5

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

Usage is implied by the description (use to find citing articles for a PMID), but there is no explicit guidance on when not to use, prerequisites, or alternatives (e.g., might be better to use search_articles for broader queries).

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

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