Skip to main content
Glama
marc-hanheide

PDF Redaction MCP Server

list_loaded_pdfs

View currently loaded PDF files in the PDF Redaction MCP Server to manage documents for content review and redaction processes.

Instructions

List all currently loaded PDF files.

Returns: List of loaded PDF file paths

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler function for the 'list_loaded_pdfs' tool. It is decorated with @mcp.tool, which handles registration in FastMCP. The function lists all loaded PDFs from the global _loaded_pdfs dictionary, including page counts, or returns a message if none are loaded.
    @mcp.tool
    async def list_loaded_pdfs(ctx: Context = None) -> str:
        """List all currently loaded PDF files.
        
        Returns:
            List of loaded PDF file paths
        """
        if not _loaded_pdfs:
            return "No PDFs currently loaded."
        
        loaded_list = "\n".join(
            f"- {path} ({len(doc)} pages)" 
            for path, doc in _loaded_pdfs.items()
        )
        
        await ctx.info(f"Currently {len(_loaded_pdfs)} PDF(s) loaded")
        
        return f"Currently loaded PDFs:\n{loaded_list}"
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 lists files and returns paths, but doesn't cover critical aspects like whether it's read-only (implied but not stated), error handling (e.g., if no PDFs are loaded), performance characteristics, or format of the returned list. For a tool with zero annotation coverage, this leaves significant gaps.

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 extremely concise and well-structured: two sentences that state the action and the return value with zero waste. It's front-loaded with the core purpose, making it easy to scan and understand quickly.

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's simplicity (0 parameters, output schema exists), the description is minimally adequate. It explains what the tool does and what it returns, but lacks context about prerequisites (e.g., needing loaded PDFs) and behavioral details. With no annotations and an output schema, it meets basic needs but could be more informative for agent usage.

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 tool has 0 parameters, and schema description coverage is 100% (empty schema). The description adds no parameter information, which is appropriate here. Baseline for 0 parameters is 4, as there's nothing to document, and the description correctly focuses on output instead.

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: 'List all currently loaded PDF files.' This specifies the verb ('List') and resource ('loaded PDF files'), making it immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'list_applied_redactions' or 'load_pdf', which would require mentioning it shows only loaded files (not redaction status or loading capability).

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 doesn't mention prerequisites (e.g., that PDFs must be loaded first using 'load_pdf'), exclusions, or comparisons to siblings like 'list_applied_redactions'. The agent must infer usage from context alone.

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/marc-hanheide/redact_mcp'

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