Skip to main content
Glama

get_delegated_laws

Retrieve delegated laws by ministry, listing those without enacted enforcement decrees or rules. Filter by ministry name and control result count.

Instructions

[연계] 위임법령 목록. 소관부처별 위임법령(시행령/시행규칙 미제정) 조회.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes부처명 (예: '보건복지부')
displayYes결과 개수 (기본:20, 최대:100)
pageYes페이지 번호 (기본:1)
apiKeyNo법제처 Open API 인증키(OC)

Implementation Reference

  • Handler function for get_delegated_laws. Delegates to handleLinkage with target='lnkDep' (위임법령), searching delegated laws by ministry name.
    export const getDelegatedLaws = (apiClient: LawApiClient, input: LinkageInput) =>
      handleLinkage(apiClient, input, {
        target: "lnkDep", primaryRoot: "LawSearch", fallbackRoot: "LnkDepSearch",
        title: "위임법령 목록", emptyMsg: "위임법령이 없습니다."
      })
  • Zod schema for get_delegated_laws. Extends baseLinkageSchema with query describing a ministry/department name.
    export const DelegatedLawsSchema = baseLinkageSchema.extend({
      query: z.string().describe("부처명 (예: '보건복지부')")
    })
  • Registration of the get_delegated_laws tool in the tool registry with its name, description, schema, and handler.
    {
      name: "get_delegated_laws",
      description: "[연계] 위임법령 목록. 소관부처별 위임법령(시행령/시행규칙 미제정) 조회.",
      schema: DelegatedLawsSchema,
      handler: getDelegatedLaws
    },
  • Core shared handler logic used by getDelegatedLaws. Fetches XML from the lawSearch.do API with the configured target, parses it with fallback root, formats and returns results.
    async function handleLinkage(apiClient: LawApiClient, input: LinkageInput, cfg: LinkageConfig) {
      try {
        const xml = await apiClient.fetchApi({
          endpoint: "lawSearch.do",
          target: cfg.target,
          extraParams: { query: String(input.query), display: String(input.display || 20), page: String(input.page || 1) },
          apiKey: input.apiKey,
        })
    
        let result = parseLinkageXML(xml, cfg.primaryRoot, "law")
        if (result.totalCnt === 0 && result.items.length === 0) {
          result = parseLinkageXML(xml, cfg.fallbackRoot, "law")
        }
    
        if (result.items.length === 0) {
          return { content: [{ type: "text", text: truncateResponse(`'${input.query}' ${cfg.emptyMsg}`) }] }
        }
    
        let output = `${cfg.title} (총 ${result.totalCnt}건, ${result.page}페이지)\n`
        output += `검색어: ${input.query}\n\n`
        output += formatItems(result.items)
        return { content: [{ type: "text", text: truncateResponse(output) }] }
      } catch (error) {
        return formatToolError(error, cfg.title)
      }
    }
Behavior2/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. It does not mention pagination behavior, authentication requirements beyond the schema, rate limits, or what happens if no results are found. The description is too minimal.

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 concise sentence in Korean, front-loading the purpose. It is efficient but could include slightly more context without becoming verbose.

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 is insufficient. It does not explain the return format, how to interpret results, or provide usage examples. More context is needed for an external API tool.

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 description coverage is 100% with clear parameter descriptions. The tool description adds no extra meaning beyond the schema, so baseline 3 is appropriate.

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 states it lists delegated laws by ministry, using the verb '조회' (search/list) and resource '위임법령 목록'. It is specific and distinct from sibling tools that focus on general laws or regulations, but does not explicitly differentiate itself.

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 like search_law or get_law_text. The description lacks context for appropriate usage, prerequisites, or exclusions.

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