discover_saroday_api
Retrieve Saroday API metadata including endpoints, documentation links, and usage limits. Use this tool first to understand available tools for Korean Saju calculation and fortune-telling glossary lookup.
Instructions
Saroday API 메타 정보 조회. 사용 가능한 엔드포인트, 문서 링크, 호출 한도 등을 반환합니다. 처음 사용할 때 한 번 호출해서 어떤 도구가 있는지 파악할 수 있습니다.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- index.js:259-275 (handler)Handler function that calls Saroday API /api/v1 to fetch API metadata (endpoints, docs, rate limits) and returns a formatted markdown text response.
async function handleDiscoverApi() { const { body } = await callSarodayAPI("/api/v1"); const d = body.data; let text = `# ${d.name} ${d.version}\n\n`; text += `${d.description}\n\n`; text += `**문서:** ${d.docs}\n`; text += `**OpenAPI:** ${d.openapi}\n\n`; text += `## 사용 가능한 엔드포인트\n`; for (const [route, desc] of Object.entries(d.endpoints || {})) { text += `- \`${route}\` — ${desc}\n`; } text += `\n**호출 한도:** ${d.rateLimit?.requests || 100} requests / ${d.rateLimit?.window || "1h"}\n`; if (d.rateLimit?.note) text += `*${d.rateLimit.note}*\n`; return { content: [{ type: "text", text }] }; } - index.js:130-139 (schema)Tool definition with input schema. This tool takes no parameters (empty properties object).
{ name: "discover_saroday_api", description: "Saroday API 메타 정보 조회. 사용 가능한 엔드포인트, 문서 링크, 호출 한도 등을 반환합니다. " + "처음 사용할 때 한 번 호출해서 어떤 도구가 있는지 파악할 수 있습니다.", inputSchema: { type: "object", properties: {}, }, }, - index.js:365-367 (registration)Tool is registered via ListToolsRequestSchema handler returning the TOOLS array which includes discover_saroday_api.
server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: TOOLS, })); - index.js:380-381 (registration)The CallToolRequestSchema switch-case dispatches "discover_saroday_api" to the handleDiscoverApi() handler.
case "discover_saroday_api": return await handleDiscoverApi();