Skip to main content
Glama

search_papers

Search for cryptographic research papers in the IACR Cryptology ePrint Archive by query, year, or category, and retrieve relevant results programmatically.

Instructions

Search for papers in the IACR Cryptology ePrint Archive

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
categoryNo
max_resultsNo
queryYes
yearNo

Implementation Reference

  • The main handler function that implements the search_papers tool: validates args, fetches IACR ePrint RSS feed, parses XML, filters papers by query, optional year/category/max_results, returns JSON list of matching papers.
    private async searchPapers(args: unknown) {
      const validatedArgs = SearchPapersSchema.parse(args);
      
      try {
        // Fetch RSS feed with comprehensive headers
        const response = await axios.get(IACR_RSS_URL, {
          headers: {
            'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36',
            'Accept': 'application/xml,text/xml,*/*;q=0.8',
            'Accept-Language': 'en-US,en;q=0.9'
          },
          timeout: 15000
        });
    
        // Parse XML feed
        const parsedFeed = await parseStringPromise(response.data);
        
        // Ensure items exist
        if (!parsedFeed.rss?.channel?.[0]?.item) {
          console.error('No items found in RSS feed');
          return { content: [{ type: 'text', text: '[]' }] };
        }
    
        // Current year for filtering
        const currentYear = new Date().getFullYear();
    
        // Extract and filter papers
        const papers = parsedFeed.rss.channel[0].item
          .map((item: any) => ({
            id: item.link[0].split('/').pop(),
            title: item.title[0],
            authors: item['dc:creator'] ? item['dc:creator'][0] : 'Unknown',
            link: item.link[0],
            description: item.description[0],
            pubDate: item.pubDate[0]
          }))
          .filter((paper: IACRPaper) => {
            const title = paper.title.toLowerCase();
            const description = paper.description.toLowerCase();
            const query = validatedArgs.query.toLowerCase();
            
            // Query matching
            const matchesQuery = title.includes(query) || description.includes(query);
            
            // Year filtering
            const paperYear = new Date(paper.pubDate).getFullYear();
            const matchesYear = !validatedArgs.year || 
              (validatedArgs.year && paperYear === validatedArgs.year) ||
              (paperYear >= currentYear - 10);
            
            return matchesQuery && matchesYear;
          })
          .slice(0, validatedArgs.max_results)
          .map((paper: IACRPaper) => ({
            id: paper.id,
            title: paper.title,
            authors: paper.authors,
            year: new Date(paper.pubDate).getFullYear(),
            link: paper.link,
            abstract: paper.description
          }));
    
        // Log results for debugging
        console.error('Search Results:', JSON.stringify(papers, null, 2));
    
        return {
          content: [{
            type: 'text',
            text: JSON.stringify(papers, null, 2)
          }]
        };
      } catch (error) {
        // Comprehensive error logging
        console.error('Search Error:', error);
    
        throw new McpError(
          ErrorCode.InternalError,
          `Search failed: ${error instanceof Error ? error.message : 'Unknown error'}`
        );
      }
    }
  • Zod schema defining the input parameters for search_papers: query (required string), optional year (number), category (string), max_results (number, default 20).
    const SearchPapersSchema = z.object({
      query: z.string(),
      year: z.number().optional(),
      category: z.string().optional(),
      max_results: z.number().optional().default(20)
    });
  • src/index.ts:67-80 (registration)
    Tool registration in the listTools handler: defines name, description, and inputSchema for search_papers.
    {
      name: 'search_papers',
      description: 'Search for papers in the IACR Cryptology ePrint Archive',
      inputSchema: {
        type: 'object',
        properties: {
          query: { type: 'string' },
          year: { type: 'number' },
          category: { type: 'string' },
          max_results: { type: 'number', default: 20 }
        },
        required: ['query']
      }
    },
Behavior2/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 only states the basic function. It doesn't describe what the search returns (e.g., list of papers, metadata), whether it's paginated, rate-limited, or has authentication requirements, leaving significant gaps for a tool with 4 parameters and no output schema.

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, efficient sentence with zero wasted words. It's appropriately sized for a basic search tool and front-loads the core purpose without unnecessary elaboration.

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 the complexity (4 parameters, no annotations, no output schema), the description is incomplete. It doesn't explain return values, error conditions, or parameter usage, making it inadequate for an agent to reliably invoke this tool without additional context or trial-and-error.

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%, so the description must compensate but adds no information about parameters. It doesn't explain what 'category', 'max_results', 'query', or 'year' mean, their formats, or how they affect the search, leaving all 4 parameters undocumented beyond their schema types.

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 action ('Search for papers') and the target resource ('IACR Cryptology ePrint Archive'), providing a specific verb+resource combination. However, it doesn't explicitly differentiate from sibling tools like 'download_paper' or 'get_paper_details' beyond implying this is a search operation versus retrieval operations.

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?

The description provides no guidance on when to use this tool versus alternatives like 'download_paper' or 'get_paper_details'. It doesn't mention prerequisites, exclusions, or contextual factors that would help an agent choose between these tools, leaving usage entirely implicit.

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

Related 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/doomdagadiggiedahdah/iacr-mcp-server'

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