korean-law-mcp

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

korean-law-mcp

korean-law-mcp

Skill by ara.so — MCP Skills collection.
ara.so开发的Skill —— 属于MCP Skills集合。

Overview

概述

korean-law-mcp is a Model Context Protocol (MCP) server that transforms 41 Korean Ministry of Government Legislation (법제처) APIs into 17 streamlined tools. It provides comprehensive access to Korean legal information including statutes, precedents, administrative rules, local ordinances, treaties, and interpretations with advanced features like:
  • Citation verification to detect LLM hallucinations in legal responses
  • Impact mapping showing downstream effects of legal provisions
  • Time-travel diff comparing statute text between arbitrary dates
  • Citizen action plans converting natural language problems into 5-step legal guides
The server integrates with Claude Desktop, Cursor, Windsurf, Zed, and other MCP clients. All data comes from official 법제처 (Korea Legislation Research Institute) APIs.
korean-law-mcp是一款Model Context Protocol(MCP)服务器,它将韩国法制处(법제처)的41个API转化为17个简化工具。它提供对韩国法律信息的全面访问,包括成文法、判例、行政法规、地方条例、条约以及司法解释,并具备以下高级功能:
  • 引用验证:检测法律回复中的LLM幻觉内容
  • 影响图谱:展示法律条款的下游影响
  • 时间旅行对比:对比任意日期之间的成文法文本差异
  • 公民行动指南:将自然语言描述的问题转化为5步法律指引
该服务器可与Claude Desktop、Cursor、Windsurf、Zed及其他MCP客户端集成。所有数据均来自官方法制处(Korea Legislation Research Institute)API。

Installation

安装

NPX (Recommended)

NPX(推荐)

Add to your MCP client configuration (e.g.,
claude_desktop_config.json
):
json
{
  "mcpServers": {
    "korean-law": {
      "command": "npx",
      "args": [
        "-y",
        "korean-law-mcp"
      ],
      "env": {
        "MOLEG_API_KEY": "your-api-key-here"
      }
    }
  }
}
添加到你的MCP客户端配置文件中(例如:
claude_desktop_config.json
):
json
{
  "mcpServers": {
    "korean-law": {
      "command": "npx",
      "args": [
        "-y",
        "korean-law-mcp"
      ],
      "env": {
        "MOLEG_API_KEY": "your-api-key-here"
      }
    }
  }
}

Global Install

全局安装

bash
npm install -g korean-law-mcp
korean-law-mcp
bash
npm install -g korean-law-mcp
korean-law-mcp

Local Development

本地开发

bash
git clone https://github.com/chrisryugj/korean-law-mcp.git
cd korean-law-mcp
npm install
npm run build
npm start
bash
git clone https://github.com/chrisryugj/korean-law-mcp.git
cd korean-law-mcp
npm install
npm run build
npm start

Configuration

配置

Required Environment Variables

必填环境变量

bash
undefined
bash
undefined

법제처 Open API key (required)

法制处Open API密钥(必填)

MOLEG_API_KEY=your_api_key_here

Get your API key from: https://www.law.go.kr/DRF/lawService.do
MOLEG_API_KEY=your_api_key_here

获取API密钥:https://www.law.go.kr/DRF/lawService.do

Optional Environment Variables

可选环境变量

bash
undefined
bash
undefined

Server configuration

服务器配置

PORT=3000 # HTTP server port (default: 3000) TRUST_PROXY=1 # Trust X-Forwarded-For (default: 1) LAW_USER_AGENT=Mozilla/5.0 # Custom User-Agent for API calls
PORT=3000 # HTTP服务器端口(默认:3000) TRUST_PROXY=1 # 信任X-Forwarded-For(默认:1) LAW_USER_AGENT=Mozilla/5.0 # API调用的自定义User-Agent

Rate limiting (per IP)

速率限制(按IP)

RATE_LIMIT_WINDOW_MS=60000 # Window in ms (default: 60000) RATE_LIMIT_MAX_REQUESTS=100 # Max requests per window (default: 100)
undefined
RATE_LIMIT_WINDOW_MS=60000 # 时间窗口(毫秒,默认:60000) RATE_LIMIT_MAX_REQUESTS=100 # 每个窗口的最大请求数(默认:100)
undefined

Core Tools

核心工具

1. Citation Verification (
verify_citations
)

1. 引用验证 (
verify_citations
)

Detects LLM hallucinations by cross-referencing cited legal provisions against official databases.
typescript
// Natural language trigger
"민법 제750조에 따라 불법행위 손해배상을 청구하고, 형법 제9999조는 가중처벌을 정한다"

// Tool input
{
  "userText": "민법 제750조에 따라 불법행위 손해배상을 청구하고, 형법 제9999조는 가중처벌을 정한다"
}

// Response structure
{
  "citations": [
    {
      "lawName": "민법",
      "article": "750",
      "status": "verified",
      "exists": true,
      "title": "불법행위의 내용"
    },
    {
      "lawName": "형법", 
      "article": "9999",
      "status": "invalid",
      "exists": false,
      "reason": "해당 조문 없음 (존재 범위: 제1조~제372조)"
    }
  ],
  "summary": "검증 결과: 2건 중 ✓ 1건 실존, ✗ 1건 환각"
}
通过与官方数据库交叉引用,检测LLM生成内容中的幻觉引用。
typescript
// 自然语言触发词
"민법 제750조에 따라 불법행위 손해배상을 청구하고, 형법 제9999조는 가중처벌을 정한다"

// 工具输入
{
  "userText": "민법 제750조에 따라 불법행위 손해배상을 청구하고, 형법 제9999조는 가중처벌을 정한다"
}

// 响应结构
{
  "citations": [
    {
      "lawName": "민법",
      "article": "750",
      "status": "verified",
      "exists": true,
      "title": "불법행위의 내용"
    },
    {
      "lawName": "형법", 
      "article": "9999",
      "status": "invalid",
      "exists": false,
      "reason": "해당 조문 없음 (존재 범위: 제1조~제372조)"
    }
  ],
  "summary": "검증 결과: 2건 중 ✓ 1건 실존, ✗ 1건 환각"
}

2. Impact Map (
impact_map
)

2. 影响图谱 (
impact_map
)

Generates dependency graphs showing which precedents, decisions, and regulations cite a specific provision.
typescript
// Natural language trigger
"민법 제103조 인용한 판례"

// Tool input
{
  "lawName": "민법",
  "article": "103"
}

// Response includes Mermaid graph code
{
  "graph": "graph LR\n    민법_제103조[\"⚖️ 민법 제103조\"] --> P[\"📚 대법원 판례\"]\n    ...",
  "precedents": [...],
  "constitutionalDecisions": [...],
  "localOrdinances": [...]
}
生成依赖关系图,展示哪些判例、裁决和法规引用了特定条款。
typescript
// 自然语言触发词
"민법 제103조 인용한 판례"

// 工具输入
{
  "lawName": "민법",
  "article": "103"
}

// 响应包含Mermaid图谱代码
{
  "graph": "graph LR\n    민법_제103조[\"⚖️ 민법 제103조\"] --> P[\"📚 대법원 판례\"]\n    ...",
  "precedents": [...],
  "constitutionalDecisions": [...],
  "localOrdinances": [...]
}

3. Time Travel Diff (
time_travel
)

3. 时间旅行对比 (
time_travel
)

Compares statute text between two dates with automatic article-level diff.
typescript
// Natural language trigger
"개인정보보호법 2020-01-01 vs 2025-11-01"

// Tool input
{
  "lawName": "개인정보보호법",
  "dateA": "20200101",
  "dateB": "20251101"
}

// Response structure
{
  "metadata": {
    "lawName": "개인정보보호법",
    "dateA": "2020-01-01",
    "dateB": "2025-11-01"
  },
  "diff": [
    {
      "article": "제15조",
      "changeType": "modified",
      "before": "...",
      "after": "...",
      "charDelta": "+120"
    },
    {
      "article": "제39조의2",
      "changeType": "added",
      "after": "..."
    }
  ]
}
对比两个日期之间的成文法文本,自动进行条款级差异分析。
typescript
// 自然语言触发词
"개인정보보호법 2020-01-01 vs 2025-11-01"

// 工具输入
{
  "lawName": "개인정보보호법",
  "dateA": "20200101",
  "dateB": "20251101"
}

// 响应结构
{
  "metadata": {
    "lawName": "개인정보보호법",
    "dateA": "2020-01-01",
    "dateB": "2025-11-01"
  },
  "diff": [
    {
      "article": "제15조",
      "changeType": "modified",
      "before": "...",
      "after": "...",
      "charDelta": "+120"
    },
    {
      "article": "제39조의2",
      "changeType": "added",
      "after": "..."
    }
  ]
}

4. Citizen Action Plan (
action_plan
)

4. 公民行动指南 (
action_plan
)

Converts natural language legal problems into structured 5-step guides.
typescript
// Natural language trigger
"전세금 못 받았어"

// Tool input
{
  "situation": "전세금 못 받았어"
}

// Response structure
{
  "steps": [
    {
      "step": 1,
      "title": "상황진단",
      "content": "주택임대차보호법 제3조의2 (임차권등기명령)",
      "relevantLaws": ["주택임대차보호법"]
    },
    {
      "step": 2,
      "title": "권리/구제수단",
      "precedents": [...]
    },
    {
      "step": 3,
      "title": "신청기관/기한",
      "agencies": ["지방법원", "임대차분쟁조정위원회"]
    },
    {
      "step": 4,
      "title": "필요서류/양식",
      "documents": [...]
    },
    {
      "step": 5,
      "title": "함정/주의사항",
      "warnings": ["소멸시효 3년", "법률구조공단 무료 지원"]
    }
  ]
}
将自然语言描述的法律问题转化为结构化的5步指引。
typescript
// 自然语言触发词
"전세금 못 받았어"

// 工具输入
{
  "situation": "전세금 못 받았어"
}

// 响应结构
{
  "steps": [
    {
      "step": 1,
      "title": "상황진단",
      "content": "주택임대차보호법 제3조의2 (임차권등기명령)",
      "relevantLaws": ["주택임대차보호법"]
    },
    {
      "step": 2,
      "title": "권리/구제수단",
      "precedents": [...]
    },
    {
      "step": 3,
      "title": "신청기관/기한",
      "agencies": ["지방법원", "임대차분쟁조정위원회"]
    },
    {
      "step": 4,
      "title": "필요서류/양식",
      "documents": [...]
    },
    {
      "step": 5,
      "title": "함정/주의사항",
      "warnings": ["소멸시효 3년", "법률구조공단 무료 지원"]
    }
  ]
}

5. Search Laws (
search_law
)

5. 法律搜索 (
search_law
)

Search Korean statutes by keyword.
typescript
// Tool input
{
  "query": "개인정보",
  "display": 10
}

// Response
{
  "results": [
    {
      "lawId": "001615",
      "lawName": "개인정보 보호법",
      "lawAbbr": "개인정보보호법",
      "promulgationDate": "20110329",
      "enforcementDate": "20110930"
    }
  ],
  "nextSteps": "💡 다음: get_law_text({lawName: '개인정보 보호법'})"
}
通过关键词搜索韩国成文法。
typescript
// 工具输入
{
  "query": "개인정보",
  "display": 10
}

// 响应
{
  "results": [
    {
      "lawId": "001615",
      "lawName": "개인정보 보호법",
      "lawAbbr": "개인정보보호법",
      "promulgationDate": "20110329",
      "enforcementDate": "20110930"
    }
  ],
  "nextSteps": "💡 다음: get_law_text({lawName: '개인정보 보호법'})"
}

6. Get Law Text (
get_law_text
)

6. 获取法律文本 (
get_law_text
)

Retrieve full statute text with hierarchical structure.
typescript
// Tool input
{
  "lawName": "민법",
  "enforcementDate": "20250101" // optional
}

// Response
{
  "lawName": "민법",
  "articles": [
    {
      "articleNumber": "1",
      "articleTitle": "법원",
      "paragraphs": [
        {
          "paragraphNumber": "1",
          "content": "민사에 관하여 법률에 규정이 없으면..."
        }
      ]
    }
  ]
}
获取带有层级结构的完整成文法文本。
typescript
// 工具输入
{
  "lawName": "민법",
  "enforcementDate": "20250101" // 可选
}

// 响应
{
  "lawName": "민법",
  "articles": [
    {
      "articleNumber": "1",
      "articleTitle": "법원",
      "paragraphs": [
        {
          "paragraphNumber": "1",
          "content": "민사에 관하여 법률에 규정이 없으면..."
        }
      ]
    }
  ]
}

7. Get Precedents (
get_precedents
)

7. 获取判例 (
get_precedents
)

Search court decisions, constitutional decisions, and administrative appeals.
typescript
// Tool input
{
  "query": "부당해고",
  "decisionType": "precedent", // or "constitutional", "admin_appeal"
  "display": 5
}

// Response (with compact mode by default)
{
  "decisions": [
    {
      "caseNumber": "2023두12345",
      "court": "대법원",
      "decisionDate": "2023-05-15",
      "caseTitle": "부당해고구제재심판정취소",
      "summary": "판시사항 [800자] ... [중략] ... 주문 [400자]",
      "referenceLaws": ["근로기준법 제23조"],
      "referencePrecedents": ["2020.3.26. 2018두56077"]
    }
  ]
}
Add
"full": true
to get complete decision text:
typescript
{
  "query": "부당해고",
  "decisionType": "precedent",
  "full": true
}
搜索法院判决、宪法裁决和行政复议决定。
typescript
// 工具输入
{
  "query": "부당해고",
  "decisionType": "precedent", // 或 "constitutional", "admin_appeal"
  "display": 5
}

// 响应(默认紧凑模式)
{
  "decisions": [
    {
      "caseNumber": "2023두12345",
      "court": "대법원",
      "decisionDate": "2023-05-15",
      "caseTitle": "부당해고구제재심판정취소",
      "summary": "판시사항 [800자] ... [중략] ... 주문 [400자]",
      "referenceLaws": ["근로기준법 제23조"],
      "referencePrecedents": ["2020.3.26. 2018두56077"]
    }
  ]
}
添加
"full": true
以获取完整判决文本:
typescript
{
  "query": "부당해고",
  "decisionType": "precedent",
  "full": true
}

Common Patterns

常见使用模式

Multi-Step Legal Analysis

多步骤法律分析

typescript
// Step 1: Search relevant law
search_law({ query: "식품위생법" })

// Step 2: Get full text
get_law_text({ lawName: "식품위생법" })

// Step 3: Check precedents
get_precedents({ 
  query: "식품위생법 영업정지", 
  decisionType: "admin_appeal" 
})

// Step 4: Get penalty schedules (별표)
get_annex({ 
  lawName: "식품위생법", 
  annexType: "별표" 
})

// Step 5: Check administrative rules
search_administrative_rules({ query: "식품위생법 시행규칙" })
typescript
// 步骤1:搜索相关法律
search_law({ query: "식품위생법" })

// 步骤2:获取完整文本
get_law_text({ lawName: "식품위생법" })

// 步骤3:查询判例
get_precedents({ 
  query: "식품위생법 영업정지", 
  decisionType: "admin_appeal" 
})

// 步骤4:获取罚则附表(별표)
get_annex({ 
  lawName: "식품위생법", 
  annexType: "별표" 
})

// 步骤5:查询行政法规
search_administrative_rules({ query: "식품위생법 시행규칙" })

Contract Review Workflow

合同审核流程

typescript
// 1. Verify all cited provisions
verify_citations({ 
  userText: "[contract text with legal citations]" 
})

// 2. For each valid citation, get impact map
impact_map({ 
  lawName: "민법", 
  article: "103" 
})

// 3. Check if provisions have changed recently
time_travel({ 
  lawName: "민법",
  dateA: "20200101",
  dateB: "20250101"
})
typescript
// 1. 验证所有引用条款
verify_citations({ 
  userText: "[包含法律引用的合同文本]" 
})

// 2. 对每个有效引用,生成影响图谱
impact_map({ 
  lawName: "민법", 
  article: "103" 
})

// 3. 检查条款近期是否有变更
time_travel({ 
  lawName: "민법",
  dateA: "20200101",
  dateB: "20250101"
})

Regulatory Compliance Check

合规性检查

typescript
// 1. Find all relevant regulations
search_law({ query: "개인정보" })
search_administrative_rules({ query: "개인정보" })

// 2. Get enforcement dates
get_law_text({ 
  lawName: "개인정보 보호법",
  enforcementDate: "20250101" 
})

// 3. Check interpretations
get_interpretations({ query: "개인정보 처리방침" })

// 4. Review recent precedents
get_precedents({ 
  query: "개인정보 유출",
  decisionType: "precedent" 
})
typescript
// 1. 查找所有相关法规
search_law({ query: "개인정보" })
search_administrative_rules({ query: "개인정보" })

// 2. 获取生效日期
get_law_text({ 
  lawName: "개인정보 보호법",
  enforcementDate: "20250101" 
})

// 3. 查询司法解释
get_interpretations({ query: "개인정보 처리방침" })

// 4. 查看近期判例
get_precedents({ 
  query: "개인정보 유출",
  decisionType: "precedent" 
})

Advanced Features

高级功能

Annexes and Forms (
get_annex
)

附表与表单 (
get_annex
)

Retrieve penalty schedules (별표), forms (서식), and attachments.
typescript
{
  "lawName": "식품위생법",
  "annexType": "별표",
  "annexNumber": "1"
}
获取罚则附表(별표)、表单(서식)及附件。
typescript
{
  "lawName": "식품위생법",
  "annexType": "별표",
  "annexNumber": "1"
}

Treaty Search (
search_treaty
)

条约搜索 (
search_treaty
)

Search international treaties registered in Korea.
typescript
{
  "query": "FTA",
  "country": "미국" // optional
}
搜索韩国注册的国际条约。
typescript
{
  "query": "FTA",
  "country": "미국" // 可选
}

Local Ordinances (
search_ordinance
)

地方条例搜索 (
search_ordinance
)

Search municipal and provincial ordinances.
typescript
{
  "query": "주차",
  "jurisdiction": "서울특별시" // optional
}
搜索市、道级别的地方条例。
typescript
{
  "query": "주차",
  "jurisdiction": "서울특별시" // 可选
}

Administrative Rules (
search_administrative_rules
)

行政法规搜索 (
search_administrative_rules
)

Search regulations, directives, and notices.
typescript
{
  "query": "건축법 시행규칙",
  "ruleType": "훈령" // optional: 훈령, 예규, 고시
}
搜索规程、指令及公告。
typescript
{
  "query": "건축법 시행규칙",
  "ruleType": "훈령" // 可选:훈령, 예규, 고시
}

Troubleshooting

故障排除

API Key Issues

API密钥问题

Error:
사용자 정보 검증에 실패하였습니다
bash
undefined
错误信息
사용자 정보 검증에 실패하였습니다
bash
undefined

Verify API key is set

验证API密钥是否已设置

echo $MOLEG_API_KEY
echo $MOLEG_API_KEY

Check API key validity at:

在以下地址检查API密钥有效性:

undefined
undefined

Rate Limiting

速率限制

Error:
Too Many Requests
bash
undefined
错误信息
Too Many Requests
bash
undefined

Increase rate limit in config

在配置中提高速率限制

RATE_LIMIT_MAX_REQUESTS=200 RATE_LIMIT_WINDOW_MS=60000
undefined
RATE_LIMIT_MAX_REQUESTS=200 RATE_LIMIT_WINDOW_MS=60000
undefined

User-Agent Blocking

User-Agent被拦截

Error:
fetch failed
or
[EXTERNAL_API_ERROR]
법제처 API blocks Node.js default User-Agent. The server automatically uses a browser UA, but you can override:
bash
LAW_USER_AGENT="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36"
错误信息
fetch failed
[EXTERNAL_API_ERROR]
法制处API会拦截Node.js默认的User-Agent。服务器会自动使用浏览器UA,但你也可以手动覆盖:
bash
LAW_USER_AGENT="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36"

Citation Verification False Negatives

引用验证误判

If
verify_citations
shows valid citations as invalid:
  1. Check law name matching: Use full official names (e.g., "민법" not "민사법")
  2. Article format: Use
    제123조
    or just
    123조
    , not
    123
  3. Increase search depth: The tool uses
    searchDisplay=100
    internally
如果
verify_citations
将有效引用标记为无效:
  1. 检查法律名称匹配:使用完整官方名称(例如:"민법"而非"민사법")
  2. 条款格式:使用
    제123조
    123조
    ,而非
    123
  3. 增加搜索深度:工具内部使用
    searchDisplay=100

Empty Results

无结果返回

Symptom: Valid queries return
[NOT_FOUND]
typescript
// Check enforcement date
get_law_text({ 
  lawName: "개인정보 보호법",
  enforcementDate: "20110930" // Must be after promulgation
})

// Try broader search
search_law({ 
  query: "개인정보",
  display: 50 
})
症状:有效查询返回
[NOT_FOUND]
typescript
// 检查生效日期
get_law_text({ 
  lawName: "개인정보 보호법",
  enforcementDate: "20110930" // 必须晚于颁布日期
})

// 尝试更宽泛的搜索
search_law({ 
  query: "개인정보",
  display: 50 
})

Time Travel Diff Issues

时间旅行对比问题

Error: No diff output or "identical" when laws changed
bash
undefined
错误:无差异输出或法律已变更却显示“完全一致”
bash
undefined

Ensure date format is YYYYMMDD

确保日期格式为YYYYMMDD

dateA: "20200101" # ✓ Correct dateA: "2020-01-01" # ✗ Wrong
dateA: "20200101" # ✓ 正确 dateA: "2020-01-01" # ✗ 错误

Check if law existed at both dates

检查法律在两个日期是否都存在

Use get_law_text with each date first

先分别使用get_law_text查询每个日期的法律文本

undefined
undefined

Integration Examples

集成示例

Claude Desktop Configuration

Claude Desktop配置

json
{
  "mcpServers": {
    "korean-law": {
      "command": "npx",
      "args": ["-y", "korean-law-mcp"],
      "env": {
        "MOLEG_API_KEY": "your-key-here",
        "RATE_LIMIT_MAX_REQUESTS": "150"
      }
    }
  }
}
json
{
  "mcpServers": {
    "korean-law": {
      "command": "npx",
      "args": ["-y", "korean-law-mcp"],
      "env": {
        "MOLEG_API_KEY": "your-key-here",
        "RATE_LIMIT_MAX_REQUESTS": "150"
      }
    }
  }
}

Cursor Configuration

Cursor配置

Add to
.cursor/config.json
:
json
{
  "mcp": {
    "servers": {
      "korean-law": {
        "command": "npx",
        "args": ["-y", "korean-law-mcp"],
        "env": {
          "MOLEG_API_KEY": "your-key-here"
        }
      }
    }
  }
}
添加到
.cursor/config.json
json
{
  "mcp": {
    "servers": {
      "korean-law": {
        "command": "npx",
        "args": ["-y", "korean-law-mcp"],
        "env": {
          "MOLEG_API_KEY": "your-key-here"
        }
      }
    }
  }
}

Custom MCP Connector (claude.ai)

自定义MCP连接器(claude.ai)

bash
undefined
bash
undefined

Deploy to fly.io or Vercel

部署到fly.io或Vercel

npm run build fly deploy
npm run build fly deploy

Use in claude.ai custom connector:

在claude.ai自定义连接器中使用:

undefined
undefined

Natural Language Usage

自然语言使用方式

The AI will automatically route these queries to appropriate tools:
  • "민법 750조가 실제로 존재하나?" →
    verify_citations
  • "근로기준법 개정 이력" →
    time_travel
    +
    get_law_text
  • "건축허가 절차 법적 근거" →
    search_law
    +
    search_administrative_rules
  • "전세금 못 받았을 때 대응 방법" →
    action_plan
  • "식품위생법 과태료 감경 가능?" →
    get_annex
    +
    get_precedents
  • "주차 조례 상위법 적합성" →
    search_ordinance
    +
    get_precedents
AI会自动将以下查询路由到对应的工具:
  • "민법 750조가 실제로 존재하나?" →
    verify_citations
  • "근로기준법 개정 이력" →
    time_travel
    +
    get_law_text
  • "건축허가 절차 법적 근거" →
    search_law
    +
    search_administrative_rules
  • "전세금 못 받았을 때 대응 방법" →
    action_plan
  • "식품위생법 과태료 감경 가능?" →
    get_annex
    +
    get_precedents
  • "주차 조례 상위법 적합성" →
    search_ordinance
    +
    get_precedents

Performance Tips

性能优化建议

  1. Use compact mode for precedents: Default compact saves ~74% tokens. Only use
    full: true
    when you need complete text.
  2. Chain related queries: The server suggests next steps in
    nextSteps
    field - copy and execute them.
  3. Cache law text: If analyzing multiple articles of the same law, call
    get_law_text
    once and reference locally.
  4. Batch verification: Include all citations in one
    verify_citations
    call rather than one per citation.
  1. 使用判例紧凑模式:默认紧凑模式可节省约74%的token。仅在需要完整文本时使用
    full: true
  2. 链式调用相关查询:服务器会在
    nextSteps
    字段中建议下一步操作,复制并执行即可。
  3. 缓存法律文本:如果分析同一法律的多个条款,只需调用一次
    get_law_text
    并在本地引用。
  4. 批量验证引用:将所有引用包含在一个
    verify_citations
    调用中,而非逐个调用。

References

参考资料