Skip to content

Conversation

@benjaminjackson
Copy link

Summary

This PR adds support for the Exa Answer API (/answer endpoint) to the MCP server, enabling LLM-powered answers to questions backed by search results and citations.

Changes

  • New tool: answer_exa - Provides AI-generated answers with source citations

    • Supports direct answers for specific queries (e.g., "What is the capital of France?")
    • Generates detailed summaries with citations for open-ended queries
    • Returns structured responses with answer text, citations, and cost breakdown
  • Structured output support - Added outputSchema parameter allowing custom JSON schemas to shape responses, enabling structured data extraction from answers

  • Full-text citations - Optional includeText parameter to include complete article text in citations when needed for context

  • Refactored type definitions - Introduced first-class types for Citation and CostDollars objects:

    • These types are reused across multiple endpoints but were previously defined inline
    • Currently implemented only in the Answer tool
    • Can be integrated into existing type definitions in a future refactor after merge

🤖 Generated with Claude Code

benjaminjackson and others added 3 commits October 15, 2025 21:01
- Removed peer dependency markers for:
  - Node.js
  - Express
  - Zod

Likely result of npm/package manager dependency resolution update.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
- Implement new Answer API endpoint in server configuration
- Add types for Answer API request and response
- Include new 'answer_exa' tool in available tools list
- Create types for tracking tool usage costs and citations

Enables LLM-powered answer generation with web search-backed citations and detailed cost tracking.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
- Change search type to use more precise domain filtering
- Switch from 'neural' to 'keyword' search type
- Dynamically set includeDomains based on search type
- Remove redundant search query modifications

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant