Skip to main content
Glama

generate_document

[KEY REQUIRED · 2 credits] 사용자의 사실관계로 한국 법률 문서 초안을 작성합니다(고소장·소장·내용증명·답변서·합의서·법률의견서 등). 초안의 모든 조문·판례 인용은 ask와 동일한 fail-closed law.go.kr 검증을 거칩니다. 유효한 doc_type 키는 list_document_types로 먼저 확인하세요. / Draft a Korean legal document from the user's facts. Every statute/precedent citation in the draft goes through the same fail-closed law.go.kr verification as ask. Use list_document_types first for valid doc_type keys.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
langNoDefault ko. 'en' returns the Korean original (the version to file with Korean courts/police) followed by an English translation for reference.
contextYesThe user's facts/situation the document must be built from.
doc_typeYesDocument type key from list_document_types (e.g. 'complaint').
client_tagNo선택. client_tag: 호출자 식별용, **응답에 영향 없음**(8~64자, 영숫자·_-.). 서버 로그에만 남아 호출을 골라 세는 데 씁니다. 형식이 어긋나면 무시합니다 — 거절하지 않습니다. 질의 본문에 섞지 마세요: 본문에 넣으면 질문의 일부가 되어 분류와 검증 결과가 달라집니다. / Optional caller label (8-64 chars). Logged only; never affects the response. Invalid values are ignored, not rejected. Do not put it in the query text — there it becomes part of the question.
idempotency_keyNo선택. 재시도 안전 키(8~64자, 영숫자·_-.). 같은 키로 다시 부르면 **두 번 과금되지 않고** 보관된 문서를 돌려줍니다(24시간). 30초 안에 안 끝나면 'pending'과 키를 돌려줍니다. / Optional retry-safe key. Retrying with the same key is never charged twice and replays the stored document for 24h. Long drafts return `pending` with a key after ~30s.
extra_instructionsNoOptional extra drafting instructions.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / idempotency_key
      Added value: +{
      +  "description": "선택. 재시도 안전 키(8~64자, 영숫자·_-.). 같은 키로 다시 부르면 **두 번 과금되지 않고** 보관된 문서를 돌려줍니다(24시간). 30초 안에 안 끝나면 'pending'과 키를 돌려줍니다. / Optional retry-safe key. Retrying with the same key is never charged twice and replays the stored document for 24h. Long drafts return `pending` with a key after ~30s.",
      +  "type": "string"
      +}
  2. Changed1 schema field changed
    • changedInput schema / properties / lang / description
      Previous value: -"Default ko."New value: +"Default ko. 'en' returns the Korean original (the version to file with Korean courts/police) followed by an English translation for reference."
  3. Changed1 schema field changed
    • addedInput schema / properties / client_tag
      Added value: +{
      +  "description": "선택. client_tag: 호출자 식별용, **응답에 영향 없음**(8~64자, 영숫자·_-.). 서버 로그에만 남아 호출을 골라 세는 데 씁니다. 형식이 어긋나면 무시합니다 — 거절하지 않습니다. 질의 본문에 섞지 마세요: 본문에 넣으면 질문의 일부가 되어 분류와 검증 결과가 달라집니다. / Optional caller label (8-64 chars). Logged only; never affects the response. Invalid values are ignored, not rejected. Do not put it in the query text — there it becomes part of the question.",
      +  "type": "string"
      +}
  4. Added

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does meaningful work: it discloses the credit cost (2 credits) and that every citation passes a fail-closed law.go.kr verification identical to `ask`. That is real operational context (billing, output trust level) not available in structured fields. It stops short of describing failure modes or draft size limits.

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?

Front-loads the two constraints an agent must know first — key required and 2 credits — then the purpose and verification guarantee. The Korean/English duplication doubles length, but for a bilingual legal service this is functional rather than padding, and each sentence carries distinct information.

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

Completeness4/5

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

For a paid, verification-backed drafting tool with no output schema, the description covers cost, prerequisites, and the citation-verification guarantee, which are the highest-risk unknowns. It omits what the draft response actually contains (sections, citation list) and the pending/retry flow is only in the schema, leaving a small gap.

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%, so doc_type, context, lang, client_tag, and idempotency_key are already documented in the schema, including the same 'from list_document_types' guidance the description repeats. The description adds no syntax or format detail beyond the schema, so baseline 3 applies.

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?

States a specific verb (draft/generate) and resource (Korean legal document) and enumerates concrete artifact types — 고소장·소장·내용증명·답변서·합의서·법률의견서 — so the agent knows exactly what comes out. It also distinguishes itself from siblings by naming list_document_types as the prerequisite and `ask` as the shared verification path.

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

Usage Guidelines4/5

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

Gives an explicit prerequisite (call list_document_types first for a valid doc_type key) and warns that a key is required. It does not, however, contrast against plausible alternatives in the sibling list such as search_legal_forms or lookup_statute, so the agent must infer when drafting beats searching.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources