Skip to main content
Glama

parse_cv_pdf

Extract text and structure from existing CV PDF files to enable automated resume building and updates with LaTeX formatting support.

Instructions

Parse an existing CV PDF file to extract text content and structure

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pdfPathYesRelative or absolute path to the CV PDF file

Implementation Reference

  • The core handler function for the parse_cv_pdf tool. It reads the PDF file using pypdf.PdfReader, extracts text from all pages, and returns the content wrapped in TextContent with metadata.
    async def parse_cv_pdf(pdf_path: Optional[str]) -> list[TextContent]:
        """Parse a PDF CV file."""
        if not pdf_path:
            return [TextContent(type="text", text="Error: pdfPath parameter is required")]
        
        # Resolve path
        if pdf_path.startswith('/'):
            resolved_path = Path(pdf_path)
        else:
            resolved_path = Path(REPO_PATH) / pdf_path
        
        if not resolved_path.exists():
            return [TextContent(type="text", text=f"PDF file not found: {resolved_path}")]
        
        try:
            # Parse PDF
            reader = pypdf.PdfReader(str(resolved_path))
            text = ""
            for page in reader.pages:
                text += page.extract_text() + "\n"
            
            output = f"""PDF CV Parsed Successfully:
    
    File: {pdf_path}
    Pages: {len(reader.pages)} pages
    Text Length: {len(text)} characters
    
    --- EXTRACTED CONTENT ---
    
    {text}
    
    --- END OF CONTENT ---
    
    This content can now be used to generate an enhanced CV with recent work data."""
            
            return [TextContent(type="text", text=output)]
        
        except Exception as e:
            return [TextContent(type="text", text=f"PDF parsing error: {str(e)}")]
  • The input schema definition for the parse_cv_pdf tool, specifying that pdfPath is a required string parameter.
    Tool(
        name="parse_cv_pdf",
        description="Parse an existing CV PDF file to extract text content and structure",
        inputSchema={
            "type": "object",
            "properties": {
                "pdfPath": {
                    "type": "string",
                    "description": "Relative or absolute path to the CV PDF file"
                }
            },
            "required": ["pdfPath"]
        }
    ),
  • The dispatch logic in the main @app.call_tool() handler that routes calls to the parse_cv_pdf function.
    elif name == "parse_cv_pdf":
        return await parse_cv_pdf(arguments.get("pdfPath"))
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 mentions parsing and extraction but doesn't cover important aspects like error handling (e.g., invalid PDFs), performance characteristics (e.g., processing time), or output format details. This leaves significant gaps in understanding the tool's behavior beyond basic functionality.

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 a single, efficient sentence that front-loads the core purpose without unnecessary details. It uses clear language and avoids redundancy, making it easy to parse quickly. Every word contributes directly to understanding the tool's function.

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

Completeness2/5

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

Given the complexity of parsing PDFs and the lack of annotations and output schema, the description is insufficient. It doesn't explain what 'extract text content and structure' entails in practice, such as the format of the extracted data or potential limitations. For a tool with no structured behavioral hints, more detail is needed to ensure reliable use.

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

Parameters3/5

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

The input schema has 100% description coverage, with 'pdfPath' clearly documented as 'Relative or absolute path to the CV PDF file.' The description adds no additional parameter semantics beyond what the schema provides, such as file format requirements or path examples. This meets the baseline for high schema coverage but doesn't enhance understanding.

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: 'Parse an existing CV PDF file to extract text content and structure.' It specifies the verb (parse), resource (CV PDF file), and outcome (extract text content and structure). However, it doesn't explicitly differentiate from sibling tools like 'read_cv', leaving some ambiguity about when to use one versus the other.

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 sibling tools like 'read_cv' or 'get_cv_guidelines', nor does it specify prerequisites such as needing an existing PDF file. The context is implied but not explicit, leaving the agent without clear usage instructions.

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/eyaab/cv-resume-builder-mcp'

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