Skip to main content
Glama

get_daily_term

Find legal terms matching everyday Korean words like '월세' (monthly rent) or '뺑소니' (hit-and-run) for accurate legal research.

Instructions

[지식베이스] 일상용어(월세, 뺑소니 등)로 검색하여 대응하는 법령용어를 찾을 때 사용.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes검색할 일상용어 (예: '월세', '전세', '뺑소니')
displayYes결과 수 (기본:20)
pageYes페이지 (기본:1)
apiKeyNo법제처 Open API 인증키(OC). 사용자가 제공한 경우 전달

Implementation Reference

  • The main handler function for the 'get_daily_term' tool. It calls the lawSearch.do API with target 'lstrm' and dicKndCd '011402' to search for daily terms, parses the XML response, and formats results. On empty results it returns a helpful message suggesting other tools. On error it uses formatToolError.
    export async function getDailyTerm(
      apiClient: LawApiClient,
      args: GetDailyTermInput
    ): Promise<{ content: Array<{ type: string; text: string }>; isError?: boolean }> {
      try {
        const xmlText = await apiClient.fetchApi({
          endpoint: "lawSearch.do",
          target: "lstrm",
          extraParams: {
            query: args.query,
            display: (args.display || 20).toString(),
            page: (args.page || 1).toString(),
            dicKndCd: "011402",
          },
          apiKey: args.apiKey,
        });
        const result = parseKBXML(xmlText, "LsTrmSearch");
    
        const totalCount = parseInt(result.totalCnt || "0");
        const items = result.data || [];
    
        if (totalCount === 0 || items.length === 0) {
          return {
            content: [{
              type: "text",
              text: `'${args.query}' 일상용어 검색 결과가 없습니다.\n\n💡 법령용어로 검색: search_legal_terms(query="${args.query}")\n💡 AI 검색: search_ai_law(query="${args.query}")`
            }],
            isError: true,
          };
        }
    
        let output = `🗣️ 일상용어 검색 결과 (${totalCount}건):\n\n`;
    
        for (const item of items) {
          output += `📌 ${item.법령용어명 || item.용어명}\n`;
          if (item.법령용어ID) output += `   ID: ${item.법령용어ID}\n`;
          output += `\n`;
        }
    
        output += `\n💡 상세 조회: get_legal_term_detail(query="용어명")`;
        output += `\n💡 관련 법령용어: get_daily_to_legal(dailyTerm="용어명")`;
    
        return { content: [{ type: "text", text: output }] };
      } catch (error) {
        return formatToolError(error, "get_daily_term");
      }
    }
  • Zod schema for the 'get_daily_term' tool input. Defines fields: query (required string), display (number 1-100, default 20), page (number min 1, default 1), apiKey (optional string).
    export const getDailyTermSchema = z.object({
      query: z.string().describe("검색할 일상용어 (예: '월세', '전세', '뺑소니')"),
      display: z.number().min(1).max(100).default(20).describe("결과 수 (기본:20)"),
      page: z.number().min(1).default(1).describe("페이지 (기본:1)"),
      apiKey: z.string().optional().describe("법제처 Open API 인증키(OC). 사용자가 제공한 경우 전달"),
    });
    
    export type GetDailyTermInput = z.infer<typeof getDailyTermSchema>;
  • Registration of the 'get_daily_term' tool in the MCP tool registry. Maps the tool name to its schema (getDailyTermSchema) and handler (getDailyTerm), with a description for LLM routing.
    {
      name: "get_daily_term",
      description: "[지식베이스] 일상용어(월세, 뺑소니 등)로 검색하여 대응하는 법령용어를 찾을 때 사용.",
      schema: getDailyTermSchema,
      handler: getDailyTerm
    },
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, and the description does not disclose behavioral traits such as read-only nature, side effects, or rate limits. It only states the basic search purpose.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence is concise and front-loaded with the knowledge base context. Could be slightly more structured but effectively communicates the core information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema exists, and the description does not clarify the return format. Given many sibling search tools, additional output details would improve completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the schema already documents all parameters. The description adds minimal extra meaning beyond the parameter names and descriptions already in the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Describes the tool as searching everyday terms to find legal terms (specific verb+resource). However, it does not differentiate from the sibling tool 'get_daily_to_legal', which likely has a similar purpose.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives. No mention of when not to use or which sibling tools are better suited for specific scenarios.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/workbookbulb863/korean-law-alio-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server