Skip to main content
Glama
reetp14

OpenAlex MCP Server

by reetp14

search_funders

Search for research funding organizations using full-text queries and advanced filters like country code or grants count to identify potential funding sources.

Instructions

Search funders

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
searchNoFull-text search query
filterNoKey:value OpenAlex filters. Supports entity attributes (e.g., 'country_code', 'grants_count'), IDs, and convenience filters (e.g., 'display_name.search'). Example: 'country_code:DE,grants_count:>10'
sortNoSort field with optional :desc
pageNoPage number
per_pageNoResults per page (max 200)
cursorNoCursor for deep pagination
group_byNoGroup results by field
selectNoFields to return
sampleNoRandom sample size
seedNoRandom seed
mailtoNoEmail for rate limits
api_keyNoPremium API key

Implementation Reference

  • The main handler function for the 'search_funders' tool. It invokes the makeOpenAlexRequest helper with the '/funders' endpoint and the provided arguments, then formats the JSON response as text content.
    export async function searchFunders(args: any) {
        return {
            content: [{
                    type: "text",
                    text: JSON.stringify(await makeOpenAlexRequest("/funders", args), null, 2)
                }]
        };
    }
  • Input schema for the 'search_funders' tool, defining the expected parameters such as search query, filters, pagination options, and API credentials.
    inputSchema: {
        type: "object",
        properties: {
            search: { type: "string", description: "Full-text search query" },
            filter: { type: "string", description: "Key:value OpenAlex filters. Supports entity attributes (e.g., 'country_code', 'grants_count'), IDs, and convenience filters (e.g., 'display_name.search'). Example: 'country_code:DE,grants_count:>10'" },
            sort: { type: "string", description: "Sort field with optional :desc" },
            page: { type: "number", description: "Page number" },
            per_page: { type: "number", description: "Results per page (max 200)" },
            cursor: { type: "string", description: "Cursor for deep pagination" },
            group_by: { type: "string", description: "Group results by field" },
            select: { type: "string", description: "Fields to return" },
            sample: { type: "number", description: "Random sample size" },
            seed: { type: "number", description: "Random seed" },
            mailto: { type: "string", description: "Email for rate limits" },
            api_key: { type: "string", description: "Premium API key" }
        }
    }
  • src/index.ts:183-203 (registration)
    Registration of the 'search_funders' tool in the ListTools response, including name, description, and input schema.
    {
        name: "search_funders",
        description: "Search funders",
        inputSchema: {
            type: "object",
            properties: {
                search: { type: "string", description: "Full-text search query" },
                filter: { type: "string", description: "Key:value OpenAlex filters. Supports entity attributes (e.g., 'country_code', 'grants_count'), IDs, and convenience filters (e.g., 'display_name.search'). Example: 'country_code:DE,grants_count:>10'" },
                sort: { type: "string", description: "Sort field with optional :desc" },
                page: { type: "number", description: "Page number" },
                per_page: { type: "number", description: "Results per page (max 200)" },
                cursor: { type: "string", description: "Cursor for deep pagination" },
                group_by: { type: "string", description: "Group results by field" },
                select: { type: "string", description: "Fields to return" },
                sample: { type: "number", description: "Random sample size" },
                seed: { type: "number", description: "Random seed" },
                mailto: { type: "string", description: "Email for rate limits" },
                api_key: { type: "string", description: "Premium API key" }
            }
        }
    },
  • src/index.ts:293-294 (registration)
    Dispatch case in the CallToolRequest handler that routes calls to the searchFunders handler function.
    case "search_funders":
        return await searchFunders(args);
  • Core helper utility that constructs and makes HTTP requests to the OpenAlex API endpoints, handling query parameters, headers, authentication, and errors. Used by the search_funders handler.
    export async function makeOpenAlexRequest(endpoint: string, params: OpenAlexQueryParams = {}): Promise<any> {
        const queryString = buildQueryString(params);
        const url = `${OPENALEX_BASE_URL}${endpoint}${queryString ? '?' + queryString : ''}`;
        try {
            // Build User-Agent with mailto for polite pool access
            let userAgent = 'OpenAlex-MCP-Server/1.0.0 (https://github.com/openalex-mcp-server)';
            if (params.mailto) {
                userAgent += ` mailto:${params.mailto}`;
            }
            else {
                // Use environment variable for default email
                const defaultEmail = process.env.OPENALEX_DEFAULT_EMAIL || 'mcp-server@example.com';
                userAgent += ` mailto:${defaultEmail}`;
            }
    
            // Build headers
            const headers: Record<string, string> = {
                'Accept': 'application/json',
                'User-Agent': userAgent
            };
    
            // Add Bearer token - check parameter first, then environment variable
            const bearerToken = params.bearer_token || process.env.OPENALEX_BEARER_TOKEN;
            if (bearerToken) {
                headers['Authorization'] = `Bearer ${bearerToken}`;
            }
    
            const response = await axios.get(url, {
                headers,
                timeout: 30000
            });
            return response.data;
        }
        catch (error) {
            if (axios.isAxiosError(error)) {
                throw new Error(`OpenAlex API error: ${error.response?.status} - ${error.response?.statusText || error.message}`);
            }
            throw error;
        }
    }
Behavior1/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure but provides none. It doesn't mention whether this is a read-only operation, what rate limits apply, what authentication is required, what the response format looks like, or any behavioral characteristics. For a search tool with 12 parameters, this complete lack of behavioral context is inadequate.

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 maximally concise at just two words. While this represents under-specification rather than ideal conciseness, according to the scoring framework, extremely brief descriptions that don't waste words receive high conciseness scores. Every word in 'Search funders' serves a purpose, even if that purpose is insufficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (12 parameters, no output schema, no annotations) and the presence of multiple sibling tools, the description is completely inadequate. It doesn't explain what a 'funder' is in this context, what the search returns, how results are structured, or any operational considerations. For a tool with this many configuration options and no structured behavioral annotations, the description fails to provide necessary context.

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?

The schema description coverage is 100%, meaning all 12 parameters are documented in the input schema itself. The description adds no additional parameter information beyond what's already in the schema. According to the scoring rules, when schema coverage is high (>80%), the baseline is 3 even with no parameter information in the description.

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

Purpose2/5

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

The description 'Search funders' is a tautology that restates the tool name without adding meaningful context. It doesn't specify what kind of search this performs (full-text, filtered, paginated) or what resources it searches through. While the name implies searching for funders, the description provides no additional clarification about scope or method.

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

Usage Guidelines1/5

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

The description provides absolutely no guidance about when to use this tool versus alternatives. With multiple sibling search tools available (search_authors, search_institutions, search_publishers, etc.), there's no indication that this tool is specifically for funder entities or how it differs from other search tools. No prerequisites, alternatives, or context for usage is mentioned.

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/reetp14/openalex-mcp'

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