Skip to main content
Glama

search_pdf_info

Retrieve detailed information about a PDF search session using the session ID from a previous search operation.

Instructions

Get information about a search session.

Args:
    search_id: Search session ID from previous search

Returns:
    Information about the search session

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
search_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler implementation for the `search_pdf_info` tool.
    async def search_pdf_info(search_id: str) -> str:
        """Get information about a search session.
        
        Args:
            search_id: Search session ID from previous search
        
        Returns:
            Information about the search session
        """
        with cache_lock:
            session = search_sessions.get(search_id)
            if not session:
                return f"Error: Search session '{search_id}' not found or expired"
            
            session.last_accessed = datetime.now()
            
            total_pages = (len(session.results) + session.page_size - 1) // session.page_size
            
            result = f"Search Session Information:\n"
            result += f"Search ID: {search_id}\n"
            result += f"PDF Path: {session.pdf_path}\n"
            result += f"Pattern: {session.pattern}\n"
            result += f"Total matches: {session.total_results}\n"
            result += f"Current page: {session.current_page}/{total_pages}\n"
            result += f"Results per page: {session.page_size}\n"
            result += f"Last accessed: {session.last_accessed.strftime('%Y-%m-%d %H:%M:%S')}\n"
            
            return result
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool 'Get information' but doesn't clarify what type of information (e.g., status, results, metadata), whether it's read-only or has side effects, or any constraints like rate limits. This leaves significant gaps in understanding the tool's behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately concise with three sentences that cover purpose, parameter, and return value. It's front-loaded with the main function, though the 'Args' and 'Returns' sections could be integrated more smoothly rather than as separate labeled lines.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has an output schema (which handles return values), 1 parameter with low schema coverage, and no annotations, the description is minimally adequate. It covers the basic purpose and parameter meaning but lacks behavioral details and usage guidelines, making it incomplete for optimal agent understanding.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With only 1 parameter and 0% schema description coverage, the description adds meaningful context by explaining that 'search_id' is a 'Search session ID from previous search'. This clarifies the parameter's purpose beyond the schema's minimal title ('Search Id'), though it doesn't specify format or validation rules.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the tool 'Get information about a search session', which is a clear verb+resource combination. However, it doesn't distinguish this tool from its siblings like 'search_pdf_content' or 'search_pdf_go_page', leaving ambiguity about what specific 'information' it provides versus other search-related tools.

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. It mentions 'search session ID from previous search', implying a prerequisite, but doesn't specify which sibling tool creates that ID or when to choose this over other search tools like 'search_pdf_content' for different purposes.

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

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