Skip to main content
Glama

search_by_author

Retrieve biomedical articles by author name, optionally filtering by affiliation, with configurable result limits.

Instructions

Find articles by specific author(s)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
author_nameYesAuthor name (e.g., "Smith J", "John Smith")
affiliationNoAuthor affiliation/institution (optional)
max_resultsNoMaximum results (default: 50)

Implementation Reference

  • The handler function `handleSearchByAuthor` that executes the tool logic. It accepts `author_name`, optional `affiliation`, and `max_results`, builds a query using `buildFieldQuery`, calls `eutilsClient.search()`, and returns results as JSON text content.
    async function handleSearchByAuthor(args: any) {
      const { author_name, affiliation, max_results = 50 } = args;
    
      let query = buildFieldQuery(author_name, 'Author');
    
      if (affiliation) {
        query += ' AND ' + buildFieldQuery(affiliation, 'Affiliation');
      }
    
      const searchResult = await eutilsClient.search({
        term: query,
        retmax: max_results,
        sort: 'pub+date'
      });
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify({
              author: author_name,
              affiliation,
              totalResults: searchResult.count,
              pmids: searchResult.pmids
            }, null, 2)
          }
        ]
      };
    }
  • Input schema definition for 'search_by_author' tool. Defines `author_name` (required string), `affiliation` (optional string), and `max_results` (optional number, default 50) with constraints.
    name: 'search_by_author',
    description: 'Find articles by specific author(s)',
    inputSchema: {
      type: 'object',
      properties: {
        author_name: {
          type: 'string',
          description: 'Author name (e.g., "Smith J", "John Smith")'
        },
        affiliation: {
          type: 'string',
          description: 'Author affiliation/institution (optional)'
        },
        max_results: {
          type: 'number',
          description: 'Maximum results (default: 50)',
          minimum: 1,
          maximum: 1000
        }
      },
      required: ['author_name']
    }
  • src/index.ts:446-447 (registration)
    Registration/case branch inside the `CallToolRequestSchema` handler that routes 'search_by_author' to `handleSearchByAuthor`.
    case 'search_by_author':
      return await handleSearchByAuthor(args);
  • Helper function `buildFieldQuery` used by the handler to format query terms with field qualifiers (e.g., 'Smith[Author]'). Delegates to `sanitizeSearchTerm`.
    export function buildFieldQuery(term: string, field: string): string {
      const sanitized = sanitizeSearchTerm(term);
      return `${sanitized}[${field}]`;
    }
Behavior2/5

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

Without annotations, the description carries full burden but only provides basic purpose. No details on behavior like pagination, sorting, error handling, or rate limits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

One sentence is concise but lacks any structure or additional context. It is front-loaded but does not earn its place with added value beyond the name.

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?

Given 3 parameters and no output schema, the description fails to cover return format, pagination, or edge cases. It is insufficient for complete understanding.

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?

All three parameters have descriptions in the schema (100% coverage), so the description adds no additional meaning. Baseline score of 3 applies.

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 clearly states the verb 'Find' and the resource 'articles by specific author(s)', distinguishing it from sibling tools like 'search_by_journal' or 'search_by_mesh_terms'.

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?

No guidance on when to use this tool versus alternatives such as 'search_articles' or 'advanced_search'. The description omits any context for selection.

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