whooing_sections
List all budget sections (가계부) in your Whooing account to view expense categories.
Instructions
List all sections (가계부) in the Whooing account
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "whooing_sections"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/server.ts:1087-1102 (handler)The tool handler for 'whooing_sections' that calls the Whooing API 'sections.json' endpoint and formats the result.
// whooing_sections — List sections server.registerTool( "whooing_sections", { description: "List all sections (가계부) in the Whooing account", inputSchema: {}, annotations: { readOnlyHint: true }, }, async () => { const results = await client.apiGet("sections.json"); const text = formatSections( results as Parameters<typeof formatSections>[0] ); return { content: [{ type: "text", text }] }; } ); - src/formatters.ts:858-882 (schema)The SectionItem interface and formatSections helper that formats the section list output.
interface SectionItem { section_id: string; title: string; memo?: string; currency?: string; } export function formatSections(results: SectionItem[]): string { const lines: string[] = []; lines.push("## 가계부 (Section) 목록"); lines.push(""); if (!Array.isArray(results) || results.length === 0) { lines.push("가계부가 없습니다."); return lines.join("\n"); } for (const section of results) { const currency = section.currency ? ` [${section.currency}]` : ""; const memo = section.memo ? ` — ${section.memo}` : ""; lines.push(`- ${section.section_id}: ${section.title}${currency}${memo}`); } return lines.join("\n"); } - src/server.ts:1088-1094 (registration)Registration of the 'whooing_sections' tool with its description and input schema (empty), registered via server.registerTool().
server.registerTool( "whooing_sections", { description: "List all sections (가계부) in the Whooing account", inputSchema: {}, annotations: { readOnlyHint: true }, }, - src/formatters.ts:865-882 (helper)The formatSections function that renders sections into human-readable text output.
export function formatSections(results: SectionItem[]): string { const lines: string[] = []; lines.push("## 가계부 (Section) 목록"); lines.push(""); if (!Array.isArray(results) || results.length === 0) { lines.push("가계부가 없습니다."); return lines.join("\n"); } for (const section of results) { const currency = section.currency ? ` [${section.currency}]` : ""; const memo = section.memo ? ` — ${section.memo}` : ""; lines.push(`- ${section.section_id}: ${section.title}${currency}${memo}`); } return lines.join("\n"); }