Skip to main content
Glama

version

Check the current version of the PDFDancer MCP server to verify software compatibility and ensure access to updated documentation tools.

Instructions

Returns the current version of the pdfdancer-mcp server.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The async handler function for the 'version' tool. It retrieves the version from package.json (via the global 'pkg' variable) and formats it into both text content and structured JSON output for the MCP response.
    async () => { const version = pkg.version ?? 'unknown'; return { content: [ { type: 'text' as const, text: `pdfdancer-mcp version: ${version}` } ], structuredContent: {version} }; }
  • src/index.ts:215-233 (registration)
    Registers the 'version' tool on the MCP server instance, specifying the tool name, descriptive metadata, and the handler function.
    server.registerTool( 'version', { title: 'Get server version', description: 'Returns the current version of the pdfdancer-mcp server.' }, async () => { const version = pkg.version ?? 'unknown'; return { content: [ { type: 'text' as const, text: `pdfdancer-mcp version: ${version}` } ], structuredContent: {version} }; } );
  • The tool's schema metadata, including human-readable title and description used by MCP clients to understand and invoke the tool. No input parameters are defined.
    { title: 'Get server version', description: 'Returns the current version of the pdfdancer-mcp server.' },
  • Helper code that dynamically requires the package.json file and prepares the 'pkg' object from which the tool extracts the version string.
    const require = createRequire(import.meta.url); const packageJson = require('../package.json'); const pkg = packageJson as { version?: string };
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