timecard_version
Retrieve version details for the TimeCard MCP server to verify its current build, commit hash, and branch information.
Instructions
Get TimeCard MCP version information.
Returns:
commit: Git commit hash (e.g., "801fd99" or "801fd99-dirty" if has uncommitted changes)
branch: Git branch name (e.g., "v2-batch-operations")
buildDate: ISO timestamp when the MCP was built
Use this to verify which version of TimeCard MCP is running.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/management-tools.ts:45-47 (handler)The handler for timecard_version which calls getVersionInfo().
handler: async (_args, _session: TimeCardSession) => { return getVersionInfo(); } - src/tools/management-tools.ts:14-28 (helper)Helper function that reads the build version information from version.json.
function getVersionInfo() { try { const __filename = fileURLToPath(import.meta.url); const __dirname = dirname(__filename); const versionPath = join(__dirname, '..', 'version.json'); const versionData = readFileSync(versionPath, 'utf8'); return JSON.parse(versionData); } catch { return { commit: 'unknown', branch: 'unknown', buildDate: 'unknown' }; } } - src/tools/management-tools.ts:30-48 (registration)Tool definition and registration for timecard_version.
const timecardVersion: MCPTool = { name: 'timecard_version', description: `Get TimeCard MCP version information. Returns: - commit: Git commit hash (e.g., "801fd99" or "801fd99-dirty" if has uncommitted changes) - branch: Git branch name (e.g., "v2-batch-operations") - buildDate: ISO timestamp when the MCP was built Use this to verify which version of TimeCard MCP is running.`, inputSchema: { type: 'object', properties: {}, required: [] }, handler: async (_args, _session: TimeCardSession) => { return getVersionInfo(); } };