Skip to main content
Glama

search_papers_by_venue

Find academic papers published in specific journals or conferences using venue-based search. Filter results by publication year or citation count to locate relevant research publications efficiently.

Instructions

Search papers published in a specific venue/journal

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
orderNoSort order: year (by publication year) or n_citation (by citation count)
pageNoPage number, starting from 0
sizeNoNumber of papers per page, maximum 10
venueYesVenue/journal name

Implementation Reference

  • src/index.ts:74-110 (registration)
    Registration of the MCP tool 'search_papers_by_venue' with schema and inline handler function.
    server.registerTool( "search_papers_by_venue", { title: "Search Papers by Venue", description: "Search papers published in a specific venue/journal", inputSchema: { venue: z.string().describe("Venue/journal name"), page: z.number().min(0).default(0).describe("Page number, starting from 0"), size: z.number().min(1).max(10).default(10).describe("Number of papers per page, maximum 10"), order: z.enum(["year", "n_citation"]).optional().describe("Sort order: year (by publication year) or n_citation (by citation count)") } }, async ({ venue, page, size, order }) => { try { const result = await aminerClient.searchByVenue(venue, page, size, order); const formattedResult = aminerClient.formatSearchResults(result); return { content: [{ type: "text", text: JSON.stringify(formattedResult, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: JSON.stringify({ error: "Search failed", message: error instanceof Error ? error.message : 'Unknown error' }, null, 2) }], isError: true }; } } );
  • The main handler function for the 'search_papers_by_venue' tool, which calls the AminerClient and formats results.
    async ({ venue, page, size, order }) => { try { const result = await aminerClient.searchByVenue(venue, page, size, order); const formattedResult = aminerClient.formatSearchResults(result); return { content: [{ type: "text", text: JSON.stringify(formattedResult, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: JSON.stringify({ error: "Search failed", message: error instanceof Error ? error.message : 'Unknown error' }, null, 2) }], isError: true }; } }
  • Zod input schema definition for the tool parameters.
    inputSchema: { venue: z.string().describe("Venue/journal name"), page: z.number().min(0).default(0).describe("Page number, starting from 0"), size: z.number().min(1).max(10).default(10).describe("Number of papers per page, maximum 10"), order: z.enum(["year", "n_citation"]).optional().describe("Sort order: year (by publication year) or n_citation (by citation count)")
  • Helper method in AminerClient that wraps searchPapers specifically for venue searches.
    async searchByVenue(venue: string, page = 0, size = 10, order?: 'year' | 'n_citation'): Promise<SearchResult> { return this.searchPapers({ venue, page, size, order }); }
  • Core helper function that performs the actual API request to search papers by venue (or other params).
    async searchPapers(params: SearchParams): Promise<SearchResult> { // Validate required parameters if (!params.keyword && !params.venue && !params.author) { throw new Error('At least one of keyword, venue, or author must be provided'); } if (params.size > 10) { throw new Error('Size parameter cannot exceed 10'); } // Build query parameters const searchParams = new URLSearchParams(); if (params.keyword) searchParams.append('keyword', params.keyword); if (params.venue) searchParams.append('venue', params.venue); if (params.author) searchParams.append('author', params.author); searchParams.append('page', params.page.toString()); searchParams.append('size', params.size.toString()); if (params.order) searchParams.append('order', params.order); const url = `${this.config.baseUrl}?${searchParams.toString()}`; try { const response = await fetch(url, { method: 'GET', headers: { 'Authorization': this.config.apiKey, 'Content-Type': 'application/json', }, }); if (!response.ok) { throw new Error(`HTTP ${response.status}: ${response.statusText}`); } const data = await response.json() as AminerSearchResponse; // Add detailed response data check if (!data) { throw new Error('API returned empty response'); } if (!data.success) { throw new Error(`API Error (${data.code}): ${data.msg}`); } // Check the completeness of the response data if (typeof data.total !== 'number') { console.warn('API response missing or invalid total field, defaulting to 0'); } // Ensure data.data is not null, if it is null, use an empty array const papers = data.data || []; const total = data.total || 0; return { papers, total, page: params.page, size: params.size, hasMore: (params.page + 1) * params.size < total, }; } catch (error) { if (error instanceof Error) { throw new Error(`Failed to search papers: ${error.message}`); } throw new Error('Unknown error occurred while searching papers'); } }

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/scipenai/aminer-mcp-server'

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