codemend_list_errors
Retrieve recent production errors from your Codemend project to monitor and address software crashes. Filter by status and limit results for focused debugging.
Instructions
List recent production errors from your Codemend project
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Number of errors to return (1–50, default 10) | |
| status | No | Filter by status: "new" | "analyzing" | "analyzed" | "fixed" | "ignored" |
Implementation Reference
- src/index.ts:159-182 (handler)The handler function for codemend_list_errors which calls the internal API to list errors.
async ({ limit, status }): Promise<ToolResult> => { try { const apiKey = getApiKey(); const params = new URLSearchParams({ limit: String(limit ?? 10) }); if (status) params.set("status", status); const res = await apiRequest<unknown>( "GET", `/api/errors?${params.toString()}`, apiKey ); if (!res.ok) { const msg = typeof res.data === "object" && res.data !== null && "error" in res.data ? String((res.data as Record<string, unknown>).error) : `HTTP ${res.status}`; return errResult(msg); } return okResult(res.data); } catch (err) { return errResult(err instanceof Error ? err.message : String(err)); } - src/index.ts:140-158 (registration)Registration of the codemend_list_errors tool with schema definitions for limit and status parameters.
server.tool( "codemend_list_errors", "List recent production errors from your Codemend project", { limit: z .number() .int() .min(1) .max(50) .optional() .default(10) .describe("Number of errors to return (1–50, default 10)"), status: z .enum(["new", "analyzing", "analyzed", "fixed", "ignored"]) .optional() .describe( 'Filter by status: "new" | "analyzing" | "analyzed" | "fixed" | "ignored"' ), },