Skip to main content
Glama

search_acr_decisions

Retrieve Anti-Corruption and Civil Rights Commission decisions by keyword, date, or name. Filter by page and display count.

Instructions

[권익위] 국민권익위원회 결정문 검색.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryNo검색 키워드 (예: '행정심판', '고충민원', '부패행위')
displayYes페이지당 결과 개수 (기본값: 20, 최대: 100)
pageYes페이지 번호 (기본값: 1)
sortNo정렬 옵션: lasc/ldes (법령명순), dasc/ddes (날짜순)
apiKeyNo법제처 Open API 인증키(OC). 사용자가 제공한 경우 전달

Implementation Reference

  • The main handler for the 'search_acr_decisions' tool. Delegates to the generic searchCommitteeDecisions() with target='acr', committeeName='국민권익위원회 결정문', and textToolName='get_acr_decision_text'.
    export async function searchAcrDecisions(
      apiClient: LawApiClient,
      args: SearchAcrDecisionsInput
    ): Promise<{ content: Array<{ type: string, text: string }>, isError?: boolean }> {
      return searchCommitteeDecisions(apiClient, args, "acr", "국민권익위원회 결정문", "get_acr_decision_text");
    }
  • Zod schema for search_acr_decisions. Uses baseSearchSchemaOptionalQuery (query is optional).
    export const searchAcrDecisionsSchema = z.object({
      ...baseSearchSchemaOptionalQuery,
      query: z.string().optional().describe("검색 키워드 (예: '행정심판', '고충민원', '부패행위')"),
    });
    
    export type SearchAcrDecisionsInput = z.infer<typeof searchAcrDecisionsSchema>;
  • Registration of the tool in the tool registry with name 'search_acr_decisions', its schema, and handler.
    },
    {
      name: "search_acr_decisions",
      description: "[권익위] 국민권익위원회 결정문 검색.",
      schema: searchAcrDecisionsSchema,
      handler: searchAcrDecisions
    },
  • The generic searchCommitteeDecisions helper that searchAcrDecisions delegates to. Calls the lawSearch API, parses XML results, and formats the output.
    async function searchCommitteeDecisions(
      apiClient: LawApiClient,
      args: { query?: string; display?: number; page?: number; sort?: string; apiKey?: string },
      target: string,
      committeeName: string,
      textToolName: string
    ): Promise<{ content: Array<{ type: string, text: string }>, isError?: boolean }> {
      try {
        const extraParams: Record<string, string> = {
          display: (args.display || 20).toString(),
          page: (args.page || 1).toString(),
        };
        if (args.query) extraParams.query = args.query;
        if (args.sort) extraParams.sort = args.sort;
    
        const xmlText = await apiClient.fetchApi({
          endpoint: "lawSearch.do",
          target,
          extraParams,
          apiKey: args.apiKey,
        });
    
        // parseSearchXML 사용 (rootTag: searchKey, itemTag: target)
        const searchKey = getSearchKey(target);
        const itemKey = target.toLowerCase();
        const { totalCnt, page: currentPage, items: decisions } = parseSearchXML(
          xmlText, searchKey, itemKey,
          (content) => ({
            결정일련번호: extractTag(content, "결정문일련번호") || extractTag(content, "결정일련번호") || extractTag(content, "판례일련번호") || extractTag(content, "일련번호"),
            사건명: extractTag(content, "사건명") || extractTag(content, "안건명") || extractTag(content, "제목"),
            사건번호: extractTag(content, "사건번호") || extractTag(content, "의안번호"),
            결정일자: extractTag(content, "결정일자") || extractTag(content, "의결일") || extractTag(content, "선고일자") || extractTag(content, "등록일"),
            결정유형: extractTag(content, "결정유형") || extractTag(content, "결정구분") || extractTag(content, "판결유형") || extractTag(content, "회의종류"),
            재결청: extractTag(content, "재결청") || extractTag(content, "기관명"),
            상세링크: extractTag(content, "결정문상세링크") || extractTag(content, "상세링크") || extractTag(content, "판례상세링크"),
          }),
          { useIndexOf: true }
        );
    
        const totalCount = totalCnt;
    
        if (totalCount === 0) {
          let errorMsg = `검색 결과가 없습니다.`;
          errorMsg += `\n\n💡 ${committeeName} 검색 팁:`;
          errorMsg += `\n   1. 단순 키워드 사용`;
          errorMsg += `\n   2. 판례 검색: search_precedents(query="${args.query || '키워드'}")`;
          errorMsg += `\n   3. 법령해석례 검색: search_interpretations(query="${args.query || '키워드'}")`;
    
          return {
            content: [{
              type: "text",
              text: errorMsg
            }],
            isError: true
          };
        }
    
        let output = `${committeeName} 검색 결과 (총 ${totalCount}건, ${currentPage}페이지):\n\n`;
    
        for (const decision of decisions) {
          const title = decision.사건명 || "(제목 없음)";
          output += `[${decision.결정일련번호}] ${title}\n`;
          if (decision.사건번호) output += `  사건번호: ${decision.사건번호}\n`;
          if (decision.결정일자) output += `  결정일: ${decision.결정일자}\n`;
          if (decision.결정유형) output += `  결정유형: ${decision.결정유형}\n`;
          if (decision.재결청) output += `  재결청: ${decision.재결청}\n`;
          if (decision.상세링크) output += `  링크: ${decision.상세링크}\n`;
          output += `\n`;
        }
    
        output += `\n💡 전문을 조회하려면 ${textToolName}(id="결정일련번호")를 사용하세요.`;
    
        return {
          content: [{
            type: "text",
            text: output
          }]
        };
      } catch (error) {
        return formatToolError(error, `search_${target}_decisions`);
      }
    }
  • Helper function getSearchKey maps the 'acr' target string to 'Acr' for XML parsing. Also maps ftc->Ftc, ppc->Ppc, nlrc->Nlrc.
    // Helper functions
    function getSearchKey(target: string): string {
      const mapping: Record<string, string> = {
        ftc: "Ftc",
        ppc: "Ppc",
        nlrc: "Nlrc",
        acr: "Acr",
      };
      return mapping[target] || `${target.charAt(0).toUpperCase() + target.slice(1)}`;
    }
    
    function getServiceKey(target: string): string {
      const mapping: Record<string, string> = {
        ftc: "FtcService",
        ppc: "PpcService",
        nlrc: "NlrcService",
        acr: "AcrService",
      };
      return mapping[target] || `${target.charAt(0).toUpperCase() + target.slice(1)}Service`;
    }
Behavior2/5

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

No annotations are present, so the description must disclose behavioral traits. It only states 'search' without mentioning authentication needs, rate limits, pagination behavior, or what the returned data looks like. The tool's behavior is largely opaque.

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?

The description is a single short sentence that conveys the core purpose without extraneous information. It is appropriately front-loaded and concise, though it could be considered overly minimal.

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

Completeness2/5

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

Given the lack of output schema and annotations, the description does not provide sufficient context about the tool's behavior, return format, or limitations. It is incomplete for a search tool with five parameters.

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?

The input schema has 100% description coverage, meaning each parameter is already explained (e.g., query, display, page, sort, apiKey). The description adds no additional meaning beyond the schema. With full schema coverage, the baseline is 3.

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?

The description clearly identifies the tool's purpose: searching for decisions of the Anti-Corruption and Civil Rights Commission (ACRC). It uses a verb+resource structure ('search for decisions') and, given the context of sibling tools, specifically names the commission to differentiate from other search tools like search_admin_appeals or search_precedents.

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 is provided on when to use this tool versus alternatives. The description only states what the tool does, without indicating scenarios where it is most appropriate or when other sibling tools should be preferred.

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