Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
tempfile_dirNoThe directory for temporary files used for URL support. PDFs from URLs are downloaded here. Default is ~/.pdf_tools_temp~/.pdf_tools_temp
workspace_pathYesThe directory the tool can access. For security reasons, this tool can only access files within the specified workspace directory and cannot access files outside the workspace directory.

Capabilities

Features and capabilities supported by this server

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

Tools

Functions exposed to the LLM to take actions

NameDescription
read_pdf_pages

Read content from PDF file for specified page range.

Supports both local file paths and URLs. For URLs, the PDF will be downloaded
to a temporary directory and cached for future use.

Note: Avoid reading too many pages at once (recommended: <50 pages) to prevent errors.

Args:
    pdf_file_path: Path to the PDF file or URL to PDF
    start_page: Starting page number (default: 1)
    end_page: Ending page number (default: 1)
    
Returns:
    Extracted text content from the specified pages
get_pdf_info

Get basic information about a PDF file including page count.

Supports both local file paths and URLs. For URLs, the PDF will be downloaded
to a temporary directory and cached for future use.

Args:
    pdf_file_path: Path to the PDF file or URL to PDF
    
Returns:
    Basic information about the PDF file
merge_pdfs

Merge multiple PDF files into one.

Supports both local file paths and URLs. URLs will be downloaded to temporary
files before merging. Mixed local and URL paths are supported.

Args:
    pdf_paths: List of paths to PDF files to merge (in order) - can include URLs
    output_path: Path where the merged PDF will be saved (must be local path)
    
Returns:
    Success message with merge details or error message
extract_pdf_pages

Extract specific pages from a PDF and create a new PDF.

Supports URLs for source PDF. The source PDF will be downloaded to a temporary
directory if it's a URL. Output path must be a local file path.

Args:
    source_path: Path to the source PDF file or URL to PDF
    page_numbers: List of page numbers to extract (1-indexed)
    output_path: Path where the new PDF will be saved (must be local path)
    
Returns:
    Success message with extraction details or error message
search_pdf_content

Search for regex pattern in PDF content and return paginated results.

Supports both local file paths and URLs. For URLs, the PDF will be downloaded
to a temporary directory and cached for future use.

Args:
    pdf_file_path: Path to the PDF file or URL to PDF
    pattern: Regular expression pattern to search for
    page_size: Number of results per page (10-50, default: 10)

Returns:
    Search results with UUID for pagination, or error message
search_pdf_next_page

Get next page of search results.

Args:
    search_id: Search session ID from previous search

Returns:
    Next page of search results or error message
search_pdf_prev_page

Get previous page of search results.

Args:
    search_id: Search session ID from previous search

Returns:
    Previous page of search results or error message
search_pdf_go_page

Go to specific page of search results.

Args:
    search_id: Search session ID from previous search
    page_number: Page number to go to (1-indexed)

Returns:
    Specified page of search results or error message
search_pdf_info

Get information about a search session.

Args:
    search_id: Search session ID from previous search

Returns:
    Information about the search session

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

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/lockon-n/pdf-tools-mcp'

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