Skip to main content
Glama

PDFDancer MCP help

help

Get guidance on using pdfdancer-mcp server tools to search documentation and retrieve markdown content for PDF-related tasks.

Instructions

Explains the purpose of this server and how to use it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'help' tool. It renders the help document using renderHelpDocument and returns markdown text content along with the structured HelpDocument data.
    async () => {
        const text = renderHelpDocument(helpDocument);
        return {
            content: [
                {
                    type: 'text' as const,
                    text
                }
            ],
            structuredContent: helpDocument
        };
    }
  • src/index.ts:195-213 (registration)
    Registration of the 'help' tool with the MCP server, including tool name, metadata (title and description), and the inline handler function.
    server.registerTool(
        'help',
        {
            title: 'PDFDancer MCP help',
            description: 'Explains the purpose of this server and how to use it.'
        },
        async () => {
            const text = renderHelpDocument(helpDocument);
            return {
                content: [
                    {
                        type: 'text' as const,
                        text
                    }
                ],
                structuredContent: helpDocument
            };
        }
    );
  • TypeScript interface defining the structure of the HelpDocument used for structured content in the 'help' tool response.
    interface HelpDocument extends JsonObject {
        title: string;
        overview: string;
        sections: Array<{
            heading: string;
            items: string[];
        }>;
    }
  • Helper function that converts a HelpDocument object into a formatted Markdown string for the 'help' tool's text content.
    function renderHelpDocument(doc: HelpDocument): string {
        const sections = doc.sections
            .map(section => `### ${section.heading}\n${section.items.join('\n')}`)
            .join('\n\n');
        return `# ${doc.title}\n\n${doc.overview}\n\n${sections}`.trim();
    }
  • Static HelpDocument instance containing the overview, sections, and tool descriptions used by the 'help' tool handler.
    const helpDocument: HelpDocument = {
        title: 'PDFDancer SDK Documentation',
        overview:
            'This MCP server provides coding agents with searchable access to official PDFDancer SDK documentation. Use these tools to discover how to build PDF manipulation applications with pixel-perfect control over PDF documents using PDFDancer SDKs for Python, TypeScript, and Java.',
        sections: [
            {
                heading: 'What is PDFDancer?',
                items: [
                    '- **Pixel-perfect PDF control**: Edit any PDF with exact coordinate positioning and surgical text replacement',
                    '- **Edit existing PDFs**: Modify PDFs you did not create - invoices, forms, contracts, reports from any source',
                    '- **Smart text handling**: Paragraph-aware editing that preserves layout and formatting',
                    '- **Embedded font support**: Add text with embedded fonts for consistent rendering across all viewers',
                    '- **Form manipulation**: Programmatically fill, update, or delete AcroForm fields',
                    '- **Multi-language SDKs**: Available for Python 3.10+, TypeScript (Node.js 20+), and Java 11+',
                    '- **Vector graphics control**: Full control over lines, curves, shapes, and complex drawings'
                ]
            },
            {
                heading: 'Available MCP Tools',
                items: [
                    '- **help**: Display this overview',
                    '- **version**: Get the current version of the pdfdancer-mcp server',
                    '- **search-docs**: Search PDFDancer documentation by keyword to find relevant APIs and examples (max 10 results)',
                    '- **get-docs**: Retrieve complete documentation for a specific route with code examples'
                ]
            },
            {
                heading: 'Search Syntax (Lunr.js)',
                items: [
                    '- **Simple keywords** (OR logic): `Java images add` → matches documents with ANY word',
                    '- **Require ALL words**: `+Java +images +add` → matches only documents with ALL words (recommended for precise results)',
                    '- **Exclude words**: `+React -deprecated` → must have "React", must NOT have "deprecated"',
                    '- **Boost importance**: `authentication^10 tutorial` → prioritizes "authentication" results',
                    '- **Field search**: `title:installation` → searches only in title field',
                    '- **Wildcard**: `install*` → matches "install", "installation", "installer"',
                    '- **Fuzzy search**: `javascript~2` → tolerates up to 2 character differences (typos)',
                    '- **Exact phrase**: `title:"Java images"` → searches for exact phrase in title',
                    '- **Available fields**: title, content, tags, sidebarParentCategories'
                ]
            },
            {
                heading: 'Typical workflow for building PDFDancer applications',
                items: [
                    '1. **Search documentation**: Use `search-docs` with keywords like "authentication", "edit text", "add paragraph", or "forms" to find relevant APIs',
                    '2. **Get detailed docs**: Use `get-docs` with the route from search results to retrieve complete documentation with code examples',
                    '3. **Implement features**: Use the SDK to open existing PDFs, locate elements by text or coordinates, edit content, add new elements, and save results'
                ]
            }
        ],
    };
Behavior2/5

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

With no annotations provided, the description carries full burden but only vaguely mentions explaining server purpose and usage. It doesn't disclose what format the explanation comes in (e.g., text, structured data), whether it's interactive, or any behavioral traits like response time or dependencies.

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, clear sentence with no wasted words. It's front-loaded with the core function and efficiently states what the tool does without unnecessary elaboration.

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, no output schema, no annotations), the description is minimally adequate but lacks depth. It doesn't explain what 'help' output looks like or how it integrates with sibling tools, leaving gaps for an AI agent to fully understand its use.

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 with 100% schema description coverage, so no parameter documentation is needed. The description doesn't add parameter details, which is appropriate given the absence of parameters, warranting a baseline score above 3.

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 'explains the purpose of this server and how to use it', which provides a general purpose but lacks specificity about what 'help' actually returns or does. It doesn't clearly distinguish this from sibling tools like 'version' which might also provide server information.

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?

No explicit guidance on when to use this tool versus alternatives is provided. The description implies it's for understanding the server, but it doesn't specify if this should be used first, after errors, or instead of exploring sibling tools like 'version'.

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/MenschMachine/pdfdancer-mcp'

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