Skip to main content
Glama

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler for timecard_version which calls getVersionInfo().
    handler: async (_args, _session: TimeCardSession) => {
      return getVersionInfo();
    }
  • 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'
        };
      }
    }
  • 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();
      }
    };

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/keith-hung/timecard-mcp'

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