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'
                ]
            }
        ],
    };

Tool Definition Quality

Score is being calculated. Check back soon.

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