Skip to main content
Glama
nestordemeure

gallica-mcp

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
search_gallicaA

Search Gallica for documents matching a text query.

Searches across OCR content with support for boolean operators and exact phrases. Returns paginated results with metadata. Uses exact matching by default.

Note: To get text snippets showing where your search terms appear within documents, use the get_snippets tool with the document identifier and query.

Args: query: Text to search in OCR content. Supports CQL query syntax: - Simple text: "Houdini" or "magic tricks" (all words must appear, any order) - Exact phrases: '"Harry Houdini"' (use double quotes for exact phrase) - AND operator: "magic AND illusion" (both terms must appear - MUST BE UPPERCASE) - OR operator: "Houdini OR Houdin" (either term can appear - MUST BE UPPERCASE) - NOT operator: "magic NOT card" (first term yes, second term no - MUST BE UPPERCASE) - Parentheses: "(Houdini OR Houdin) AND escape" (group operations for precedence) - Combine all: '"Harry Houdini" AND (escape OR illusion) NOT death'

    Boolean operators (AND, OR, NOT) MUST be UPPERCASE.
    The query is converted to CQL format automatically and searches OCR text content.

page: Page number for pagination, 1-indexed (default: 1)

Returns: Dictionary containing: - page: Current page number - total_results: Total number of matching documents - total_pages: Total number of pages available - documents: List of documents with: - identifier: ARK identifier (use with download_text or get_snippets) - title: Document title - url: URL to view document on gallica.bnf.fr - creators: List of authors/creators - date: Publication date (if available) - type: Document type (e.g., monographie, périodique) - language: Language code (if available)

Examples: # Simple search search_gallica(query="Houdini")

# Exact phrase
search_gallica(query='"Harry Houdini"')

# Boolean operators
search_gallica(query="magic AND illusion")
search_gallica(query="Houdini OR Houdin")
search_gallica(query="magic NOT card")

# Complex query
search_gallica(query='("Harry Houdini" OR "Jean Houdin") AND (escape OR illusion)')
download_textA

Download OCR text from a Gallica document and save to cache in plain text format.

Args: identifier: Gallica ARK identifier (e.g., 'ark:/12148/bpt6k5619759j')

Returns: Path to the cached text file (as string)

IMPORTANT: The downloaded files are VERY LARGE (typically 100KB-1MB+ of text). DO NOT attempt to read the entire file into context. Use read tools with offset/limit parameters to read specific portions. Reading the full file will waste tokens and may cause performance issues.

Example: path = download_text("ark:/12148/bpt6k5619759j")

get_snippetsA

Fetch text snippets showing where search terms appear in a Gallica document.

Uses the ContentSearch API to find and return text excerpts with page numbers. This is useful for locating specific content within a document after searching.

Args: identifier: Gallica ARK identifier (e.g., 'ark:/12148/bpt6k5619759j') query: Search terms to find in the document. Supports the same syntax as search_gallica: - Simple text: "Houdini" or "magic tricks" - Exact phrases: '"Harry Houdini"' - Boolean operators: "magic AND illusion", "Houdini OR Houdin" - Complex queries: '("Harry Houdini" OR "Jean Houdin") AND escape'

Returns: Dictionary containing: - identifier: The document ARK identifier - query: The search query used - snippets: List of text excerpts with: - text: Snippet text showing search terms in context - page: Page identifier (e.g., "PAG_200" for page 200)

Examples: # Get snippets for a specific document get_snippets("ark:/12148/bpt6k5619759j", "Houdini")

# Find exact phrase occurrences
get_snippets("ark:/12148/bpt6k5619759j", '"Harry Houdini"')

# Complex query
get_snippets("ark:/12148/bpt6k5619759j", "magic AND (illusion OR escape)")

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription
server_infoProvide information about the Gallica MCP server.

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/nestordemeure/gallica-mcp'

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