list_cases
Return a list of your mystery cases with metadata such as name, date, location, summary, and a direct URL to open each case in the web app.
Instructions
현재 사용자의 사건 목록(메타만)을 반환합니다. 각 항목은 id, name, occurrence, location, summary, 인물·기록 수와 함께 손수첩 웹에서 바로 열 수 있는 url을 포함합니다. 사용자에게 결과를 보여줄 때 각 사건의 url을 함께 노출하세요.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools.ts:77-84 (handler)The handler function for the 'list_cases' tool. Calls 'mcp_list_cases' RPC and returns a list of cases with URLs.
handler: async () => { const rows = (await callRpc<{ id: string }[]>('mcp_list_cases', {})) ?? []; return { listUrl: listUrl(), cases: rows.map((r) => ({ ...r, url: caseUrl(r.id) })), }; }, }, - src/tools.ts:76-76 (schema)Input schema for 'list_cases' – expects an empty object (no parameters).
inputSchema: z.object({}), - src/tools.ts:71-84 (registration)The 'list_cases' tool is registered as an entry in the `tools` array (ToolDef[]).
export const tools: ToolDef[] = [ { name: 'list_cases', description: '현재 사용자의 사건 목록(메타만)을 반환합니다. 각 항목은 id, name, occurrence, location, summary, 인물·기록 수와 함께 손수첩 웹에서 바로 열 수 있는 url을 포함합니다. 사용자에게 결과를 보여줄 때 각 사건의 url을 함께 노출하세요.', inputSchema: z.object({}), handler: async () => { const rows = (await callRpc<{ id: string }[]>('mcp_list_cases', {})) ?? []; return { listUrl: listUrl(), cases: rows.map((r) => ({ ...r, url: caseUrl(r.id) })), }; }, }, - src/tools.ts:8-8 (helper)Helper function to generate a case URL by ID, used by the list_cases handler.
const caseUrl = (id: string) => `${WEB_URL}/cases/${id}`; - src/tools.ts:9-9 (helper)Helper function to generate the list URL, used by the list_cases handler.
const listUrl = () => `${WEB_URL}/cases`;