Skip to main content
Glama

search_pdf_go_page

Navigate to a specific page in PDF search results using a session ID to access targeted content efficiently.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
search_idYes
page_numberYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler for the 'search_pdf_go_page' tool, which navigates to a specific page of search results for a given session.
    @mcp.tool()
    async def search_pdf_go_page(search_id: str, page_number: int) -> str:
        """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
        """
        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
            
            if page_number < 1 or page_number > total_pages:
                return f"Error: Page number {page_number} is out of range (1-{total_pages})"
            
            session.current_page = page_number
            
            start_idx = (session.current_page - 1) * session.page_size
            end_idx = min(start_idx + session.page_size, len(session.results))
            current_results = session.results[start_idx:end_idx]
            
            result = f"Search ID: {search_id}\n"
            result += f"Pattern: {session.pattern}\n"
            result += f"Total matches: {session.total_results}\n"
Behavior3/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. It mentions that the tool returns 'Specified page of search results or error message,' which gives some insight into outcomes. However, it lacks details on error conditions, pagination behavior (e.g., total pages, what happens if page_number is out of range), or performance aspects. It adds basic context but is incomplete for a tool with no annotation support.

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 highly concise and well-structured: a clear purpose statement followed by bullet-point-like sections for 'Args' and 'Returns.' Every sentence earns its place by providing essential information without redundancy. It's front-loaded with the core functionality and efficiently details parameters and outcomes.

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

Completeness4/5

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

Given the tool's moderate complexity (2 parameters, no annotations, but has an output schema), the description is reasonably complete. It explains the purpose, parameters, and return behavior. The output schema likely covers return values, so the description doesn't need to detail them further. However, it could improve by addressing error scenarios or sibling tool differentiation, keeping it from a perfect score.

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?

The description adds significant meaning beyond the input schema, which has 0% description coverage. It explains that 'search_id' is a 'Search session ID from previous search' and 'page_number' is 'Page number to go to (1-indexed),' clarifying the purpose and format of both parameters. This compensates well for the schema's lack of descriptions, though it doesn't cover edge cases like invalid IDs.

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 tool's purpose: 'Go to specific page of search results.' It specifies the verb ('Go to') and resource ('page of search results'), but doesn't explicitly differentiate from siblings like 'search_pdf_next_page' or 'search_pdf_prev_page' beyond the 'specific page' aspect. The purpose is clear but sibling differentiation is only implicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context through the 'search_id' parameter description ('Search session ID from previous search'), suggesting this tool should be used after initiating a search. However, it doesn't provide explicit guidance on when to use this versus alternatives like 'search_pdf_next_page' or 'search_pdf_prev_page', nor does it mention prerequisites or exclusions. Usage is implied but not fully articulated.

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