Skip to main content
Glama

get_linked_ordinances

Retrieve local ordinances and rules linked to a specific national law. Enter the law name to get associated regulations across all regions.

Instructions

[연계] 법령 기준 자치법규 연계 목록. 특정 법령과 관련된 전국 조례/규칙 조회.

Input Schema

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

Implementation Reference

  • The handler function for get_linked_ordinances. Calls the shared handleLinkage function with target 'lnkLs', primary root 'LawSearch', and fallback root 'LnkLsSearch'.
    export const getLinkedOrdinances = (apiClient: LawApiClient, input: LinkageInput) =>
      handleLinkage(apiClient, input, {
        target: "lnkLs", primaryRoot: "LawSearch", fallbackRoot: "LnkLsSearch",
        title: "법령-자치법규 연계", emptyMsg: "연계 자치법규가 없습니다."
      })
  • Input schema for get_linked_ordinances (extends base schema with a query description for law name).
    export const LinkedOrdinancesSchema = baseLinkageSchema.extend({
      query: z.string().describe("법령명 (예: '국민건강보험법')")
    })
  • Registration of the get_linked_ordinances tool in the tool registry, mapping it to LinkedOrdinancesSchema and getLinkedOrdinances handler.
    // === 법령-자치법규 연계 ===
    {
      name: "get_linked_ordinances",
      description: "[연계] 법령 기준 자치법규 연계 목록. 특정 법령과 관련된 전국 조례/규칙 조회.",
      schema: LinkedOrdinancesSchema,
      handler: getLinkedOrdinances
    },
  • Import statement for getLinkedOrdinances and LinkedOrdinancesSchema from law-linkage.ts.
    import { getLinkedOrdinances, LinkedOrdinancesSchema, getLinkedOrdinanceArticles, LinkedOrdinanceArticlesSchema, getDelegatedLaws, DelegatedLawsSchema, getLinkedLawsFromOrdinance, LinkedLawsFromOrdinanceSchema } from "./tools/law-linkage.js"
  • Shared handleLinkage function that contains the core logic: API call, XML parsing, response formatting, and error handling for all linkage tools including get_linked_ordinances.
    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 present, so the description must disclose behavioral traits. It only states the tool lists linked ordinances but mentions no authentication requirements (apiKey is in schema but not required), rate limits, pagination behavior, or response format. Minimal transparency.

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?

A single concise sentence, front-loaded with category indicator. Efficient but could be slightly expanded without losing conciseness.

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 no output schema and moderate complexity (4 params), the description is incomplete. It does not explain what 'linked' entails, scope of ordinances, or response structure. Significant gaps remain.

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% with clear descriptions for each parameter. The tool description adds no further meaning—it simply restates the tool's purpose. Baseline of 3 is appropriate.

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

Purpose5/5

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

The description clearly states the tool lists ordinances/rules linked to a specific law, using a specific verb+resource structure. It distinguishes from siblings like get_linked_ordinance_articles and get_linked_laws_from_ordinance by focusing on law-to-ordinance direction.

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?

The description provides no guidance on when to use this tool vs alternatives (e.g., search_ordinance, get_linked_laws_from_ordinance). It lacks any 'when to use' or 'when not to use' context.

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