Skip to main content
Glama
alexwade

DataCite MCP Server

by alexwade

search_by_person

Search for DOIs linked to a researcher using their ORCID iD or name. Filter by role, resource type, and page size to retrieve specific publications.

Instructions

Find all DOIs associated with a researcher by ORCID iD or name.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
orcidNo
nameNo
roleNoany
resource_typeNo
page_sizeNo

Implementation Reference

  • The registerTool function that registers the 'search_by_person' tool on the MCP server, containing the full async handler logic for searching DOIs by person (ORCID or name).
    export function registerTool(server: McpServer): void {
      server.tool(
        "search_by_person",
        "Find all DOIs associated with a researcher by ORCID iD or name.",
        {
          orcid: z.string().optional(),
          name: z.string().optional(),
          role: z.enum(["creator", "contributor", "any"]).default("any"),
          resource_type: z.string().optional(),
          page_size: z.number().int().min(1).max(100).default(25),
        },
        async (params) => {
          const input = SearchByPersonSchema.parse(params);
    
          const queryParts: string[] = [];
    
          if (input.orcid) {
            const orcidId = input.orcid.replace(/^https?:\/\/orcid\.org\//, "");
            const orcidUrl = `https://orcid.org/${orcidId}`;
            if (input.role === "creator" || input.role === "any") {
              queryParts.push(
                `creators.nameIdentifiers.nameIdentifier:"${orcidUrl}"`
              );
            }
            if (input.role === "contributor") {
              queryParts.push(
                `contributors.nameIdentifiers.nameIdentifier:"${orcidUrl}"`
              );
            }
          } else if (input.name) {
            if (input.role === "creator" || input.role === "any") {
              queryParts.push(`creators.name:"${input.name}"`);
            }
            if (input.role === "contributor") {
              queryParts.push(`contributors.name:"${input.name}"`);
            }
          }
    
          const query = queryParts.join(" OR ");
    
          const apiParams: Record<string, string | number | boolean> = {
            query,
            "page[size]": input.page_size,
            detail: true,
          };
    
          if (input.resource_type) {
            apiParams["resource-type-id"] = input.resource_type.toLowerCase();
          }
    
          const cacheKey = JSON.stringify(
            Object.entries(apiParams).sort(([a], [b]) => a.localeCompare(b))
          );
    
          try {
            const response = await getCached<SearchResponse>(
              searchCache,
              cacheKey,
              () => dataciteClient.get<SearchResponse>("/dois", apiParams)
            );
    
            let next_cursor: string | null = null;
            if (response.links?.next) {
              try {
                const nextUrl = new URL(response.links.next);
                next_cursor = nextUrl.searchParams.get("page[cursor]");
              } catch {
                // ignore
              }
            }
    
            const results = (response.data ?? []).map(formatDoiSummary);
    
            return {
              content: [
                {
                  type: "text" as const,
                  text: JSON.stringify(
                    {
                      results,
                      total_results: response.meta?.total ?? results.length,
                      next_cursor,
                    },
                    null,
                    2
                  ),
                },
              ],
            };
          } catch (err) {
            const msg = err instanceof Error ? err.message : String(err);
            throw apiError(msg);
          }
        }
      );
    }
  • The SearchByPersonSchema Zod schema defining input validation (orcid, name, role, resource_type, page_size) with a refinement requiring at least one of orcid or name.
    const SearchByPersonSchema = z.object({
      orcid: z.string().optional(),
      name: z.string().optional(),
      role: z.enum(["creator", "contributor", "any"]).default("any"),
      resource_type: z.string().optional(),
      page_size: z.number().int().min(1).max(100).default(25),
    }).refine((v) => v.orcid || v.name, {
      message: "At least one of 'orcid' or 'name' is required",
    });
  • Import and registration of the registerSearchByPerson tool in the central tools index.
    import { registerTool as registerSearchByPerson } from "./search-by-person.js";
    import { registerTool as registerListRepositories } from "./list-repositories.js";
    import { registerTool as registerGetRepository } from "./get-repository.js";
    import { registerTool as registerGetDoiSchemaXml } from "./get-doi-schema-xml.js";
    
    export function registerAllTools(server: McpServer): void {
      registerSearchDois(server);
      registerGetDoi(server);
      registerFormatCitation(server);
      registerGetDoiMetrics(server);
      registerGetRelatedWorks(server);
      registerSearchByPerson(server);
      registerListRepositories(server);
      registerGetRepository(server);
      registerGetDoiSchemaXml(server);
    }
Behavior2/5

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

No annotations provided. The description does not disclose behavioral details such as pagination, default values, or that parameters like 'role' and 'resource_type' can filter results. It only mentions ORCID and name.

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

Conciseness2/5

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

The description is extremely concise (one sentence), but at the cost of omitting important details about multiple parameters and behavior. It is under-specified rather than efficiently concise.

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?

With 5 parameters, no annotations, and no output schema, the description fails to provide sufficient context. It omits pagination, filtering capabilities, and the return format, leaving the tool's full functionality unclear.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%. The description only explains 'orcid' and 'name' as search criteria, but does not clarify 'role', 'resource_type', or 'page_size'. This leaves the agent potentially unaware of available filters.

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 tool finds DOIs associated with a researcher by ORCID or name. It distinguishes from siblings like 'search_dois' (broader) and 'get_doi' (single DOI). However, it could be more precise about the scope.

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. It implies a person-based search, but lacks explicit when-to-use or when-not-to-use instructions.

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/alexwade/datacite-mcp'

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