version
Check the current version of the PDF documentation server to verify compatibility and access updated features.
Instructions
Returns the current version of the pdfdancer-mcp server.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:215-233 (registration)Registration of the 'version' tool with server.registerTool, including metadata (title, description) and inline handler function that returns the package version.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} }; } );
- src/index.ts:221-232 (handler)Inline handler function for the 'version' tool. Retrieves the version from package.json (pkg.version) and returns it in both text and structured content formats.async () => { const version = pkg.version ?? 'unknown'; return { content: [ { type: 'text' as const, text: `pdfdancer-mcp version: ${version}` } ], structuredContent: {version} }; }
- src/index.ts:9-9 (helper)Loads and types package.json to access the version string used by the 'version' tool handler.const pkg = packageJson as { version?: string };
- src/index.ts:192-192 (helper)Sets the MCP server's version property using the same pkg.version source.version: pkg.version ?? '0.0.0'