run_cron
Manually advance the game day and apply damage from missed dailies. Use when the daily cron does not auto-run.
Instructions
Run the daily cron (advance day, apply damage from missed dailies). Normally auto-runs on first action of the day.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- index.js:361-366 (schema)Tool definition/schema for run_cron — describes the tool with no input parameters.
// Cron { name: "run_cron", description: "Run the daily cron (advance day, apply damage from missed dailies). Normally auto-runs on first action of the day.", inputSchema: { type: "object", properties: {} }, }, - index.js:467-470 (handler)Handler that executes the run_cron tool by POSTing to the Habitica /cron API endpoint and returning success text.
run_cron: async () => { await api("POST", "/cron"); return ok("Cron run."); }, - index.js:482-492 (registration)Generic MCP CallTool handler that dispatches to handlers[name]; run_cron is routed here via the handlers object.
server.setRequestHandler(CallToolRequestSchema, async (req) => { const { name, arguments: args = {} } = req.params; const fn = handlers[name]; if (!fn) throw new McpError(ErrorCode.MethodNotFound, `Unknown tool: ${name}`); try { return await fn(args); } catch (err) { if (err instanceof McpError) throw err; throw new McpError(ErrorCode.InternalError, err?.message ?? String(err)); } });