{"service":"signdeal","version":"v1","mcp_server_url":"https://mcp.signdeal.kr/mcp","tools":[{"name":"generate_contract_from_text","title":"계약 초안 생성(법률고지 동반)","description":"자연어 요구사항을 한국어 계약서 초안(draft_markdown)으로 생성하고, 금액을 추출해 후속 단계상향 판단의 입력으로 넘긴다. 입력: contract_type(표준 7종 enum) + instruction(자유서술) + parties[](선택). 출력: { draft_markdown, slots, field_anchors[], review_payload(detected_amount_krw·amount_confidence·disclaimer·review_required·next), risk_warnings[] }. 다음 단계: create_draft 로 저장하거나 본문을 직접 수정하세요.","permission":"contract:draft","input_schema":{"type":"object","properties":{"contract_type":{"type":"string","enum":["loan_iou","lease_residential","lease_commercial","sale_real_estate","service","p2p_used_goods","p2p_general","employment"],"description":"계약유형(DB CHECK 표준 7종). 전자 불가 예외 유형은 create_draft 단계에서 거부됨."},"instruction":{"type":"string","minLength":1,"maxLength":50000,"description":"계약 요구사항 자유서술(예: \"친구에게 500만원 빌려주고 6개월 뒤 상환, 이자 연 5%\")."},"parties":{"type":"array","description":"당사자 역할·이름 목록(선택, 예: 채권자/채무자). 본문의 역할 앵커 생성 힌트.","items":{"type":"object","properties":{"role":{"type":"string","minLength":1,"description":"역할명(예: 채권자)."},"name":{"type":"string","minLength":1,"description":"당사자 이름."}},"required":["role","name"],"additionalProperties":false}},"language":{"type":"string","enum":["ko"],"default":"ko","description":"초안 언어(MVP: ko 고정)."}},"required":["contract_type","instruction"],"additionalProperties":false},"output_schema":{"type":"object","properties":{"draft_markdown":{"type":"string","description":"생성된 계약서 초안(Markdown)."},"field_anchors":{"type":"array","description":"탐지된 역할/필드 앵커."},"review_payload":{"type":"object","description":"detected_amount_krw·amount_confidence·review_required 등."},"risk_warnings":{"type":"array","description":"리스크 경고 목록."}},"additionalProperties":true},"example":{"request":{"contract_type":"loan_iou","instruction":"박민수에게 300만원을 빌려주고 2026년 12월 31일에 갚기로 했어."},"response":{"draft_markdown":"# 차용증...","review_payload":{"review_required":true,"next":"create_draft"},"risk_warnings":[]}},"version":"v1","status":"active","transport":"mcp","category":"contract_authoring","requires_approval":false,"annotations":{"title":"계약 초안 생성(법률고지 동반)","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false}},{"name":"create_draft","title":"계약 초안 저장","description":"계약 리소스를 draft 상태로 생성한다. amount_krw·contract_type 기준으로 required_auth_level 을 정책 평가(§4)하고, 전자 불가 예외 유형(유언·혼인신고·물권변동 등기 등)은 validation_error(type_not_allowed)로 거부한다. 출력: { contract_id, status:\"draft\", created_at, expires_at, edit_url, required_auth_level, auth_level_reason, next }. 다음 단계: add_signer 로 서명자를 추가하세요.","permission":"contract:draft","input_schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200,"description":"계약 제목(예: \"차용증(홍길동→김철수)\")."},"body_markdown":{"type":"string","minLength":1,"maxLength":50000,"description":"계약 본문(Markdown). ≤50,000자."},"contract_type":{"type":"string","enum":["loan_iou","lease_residential","lease_commercial","sale_real_estate","service","p2p_used_goods","p2p_general","employment"],"description":"계약유형(표준 7종). 전자 불가 예외 유형이면 거부."},"amount_krw":{"type":["integer","null"],"minimum":0,"default":null,"description":"계약 본질가액(원). 단계상향 임계(1천만원) 평가 입력. 미상이면 null."},"expires_in_days":{"type":"integer","minimum":1,"maximum":30,"default":7,"description":"서명 만료일(일). 1~30, 기본 7. 경과 시 expired 전이."},"template_id":{"type":["string","null"],"default":null,"description":"기반 템플릿 id(list_templates 결과). 자유서식이면 null."}},"required":["title","body_markdown","contract_type"],"additionalProperties":false},"output_schema":{"type":"object","properties":{"contract_id":{"type":"string"},"status":{"type":"string","description":"draft|ready."},"required_auth_level":{"type":"string"},"auth_level_reason":{"type":["string","null"]},"expires_at":{"type":"string"}},"additionalProperties":true},"example":{"request":{"contract_type":"loan_iou","title":"차용증","body_markdown":"# 차용증...","amount_krw":3000000},"response":{"contract_id":"ct_...","status":"ready","next":"add_signer"}},"version":"v1","status":"active","transport":"mcp","category":"contract_authoring","requires_approval":false,"annotations":{"title":"계약 초안 저장","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false}},{"name":"list_templates","title":"템플릿 조회","description":"계약 템플릿(정부 표준양식 기반 디폴트 + 테넌트 커스텀)을 조회한다. category·query 모두 선택. 출력: { templates:[{ template_id, name, category, fields[], source }] }. 빈 결과는 에러가 아니며 next 힌트로 generate_contract_from_text 자유서식 경로를 안내한다.","permission":"contract:read","input_schema":{"type":"object","properties":{"category":{"type":"string","maxLength":100,"description":"카테고리 필터(예: \"loan\"). 선택."},"query":{"type":"string","maxLength":200,"description":"이름·내용 검색어(예: \"차용증\"). 선택."}},"required":[],"additionalProperties":false},"output_schema":{"type":"object","properties":{"templates":{"type":"array","description":"{template_id,name,category,contract_type,is_system}."}},"additionalProperties":true},"example":{"request":{"contract_type":"loan_iou"},"response":{"templates":[{"template_id":"tpl_loan_iou","contract_type":"loan_iou"}]}},"version":"v1","status":"active","transport":"mcp","category":"templates","requires_approval":false,"annotations":{"title":"템플릿 조회","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true}},{"name":"add_signer","title":"서명자 추가(단계상향 평가)","description":"계약에 서명자를 추가한다. 기본 휴대폰 번호인증(phone), 고액(≥1천만원)·유형 트리거 시 서버가 identity_provider 로 강제 상향(요청값 무시). phone 은 E.164 로 정규화 저장. 동일 phone 중복 추가·서명자 수 한계(2~10) 초과는 validation_error. required_fields 로 서명 시 수신자에게 받을 정보(name·phone 필수 + birthdate·address 옵션)를 계약별로 지정한다 — 명시되지 않았으면 사용자에게 \"상대방에게 이름·연락처만 받을까요, 생년월일·주소까지 받을까요?\"라고 먼저 확인한 뒤 호출하라. 주민등록번호 전체·신분증 이미지는 수집 불가. 출력: { signer_id, status:\"added\", auth_level_requested, auth_level_effective, auth_level_reason, required_fields }.","permission":"contract:draft","input_schema":{"type":"object","properties":{"contract_id":{"type":"string","minLength":1,"description":"대상 계약 id(create_draft 결과)."},"signer":{"type":"object","description":"추가할 서명자.","properties":{"name":{"type":"string","minLength":1,"description":"서명자 이름."},"role":{"type":"string","minLength":1,"description":"역할(예: 채무자). 본문 앵커와 매칭."},"phone":{"type":"string","pattern":"^01[016789]-?\\d{3,4}-?\\d{4}$","description":"한국 휴대폰 번호. 알림톡/SMS·번호인증용. E.164 정규화 저장."},"auth_level":{"type":"string","enum":["phone","identity_provider","simple_cert"],"default":"phone","description":"요청 본인확인 레벨. 정책이 상향하면 무시되고 서버가 격상(다운레벨 금지)."},"order":{"type":"integer","minimum":1,"maximum":10,"description":"서명 순서. 중복/누락 시 서버가 입력 순서로 정규화."},"required_fields":{"type":"array","description":"서명 시 수신자에게 수집할 항목. name·phone 은 항상 포함(번호인증 필수). birthdate(생년월일)·address(주소)는 사용자가 원할 때만 추가. 미지정 = 이름·연락처만.","items":{"type":"string","enum":["name","phone","birthdate","address"]},"maxItems":4}},"required":["name","role","phone"],"additionalProperties":false}},"required":["contract_id","signer"],"additionalProperties":false},"output_schema":{"type":"object","properties":{"signer_id":{"type":"string"},"status":{"type":"string"},"auth_level_effective":{"type":"string"},"required_fields":{"type":"array"}},"additionalProperties":true},"example":{"request":{"contract_id":"ct_...","name":"박민수","phone_e164":"+821012345678","role_label":"채무자"},"response":{"signer_id":"sig_...","status":"invited","required_fields":["name","phone"]}},"version":"v1","status":"active","transport":"mcp","category":"contract_authoring","requires_approval":false,"annotations":{"title":"서명자 추가(단계상향 평가)","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false}},{"name":"set_signature_fields_auto","title":"서명필드 자동배치","description":"본문의 역할 앵커(\"(채권자) 서명:\" 등)를 탐지해 서명필드를 의미(역할)에 바인딩한다(좌표 아님). confidence 3구간: 자동배치 ≥0.85 / 검토 0.60~0.85(low_confidence_fields) / 보류 <0.60(수동 입력). 출력: { fields[], low_confidence_fields[], unplaced_signers[], unplaced_warnings[], next }. unplaced_signers 가 비어있지 않으면 send_for_signature 가 missing_signature_field 로 거부됨.","permission":"contract:draft","input_schema":{"type":"object","properties":{"contract_id":{"type":"string","minLength":1,"description":"대상 계약 id."},"strategy":{"type":"string","enum":["auto"],"default":"auto","description":"배치 전략(MVP: auto 고정 — 역할 앵커 NLP 탐지)."},"assign_by_role":{"type":"boolean","default":true,"description":"true 면 좌표가 아닌 역할로 필드를 바인딩(노스스타 §6-3 정합)."},"field_types":{"type":"array","description":"탐지 대상 필드 타입 제한(선택). 미지정 시 전체 탐지.","items":{"type":"string","enum":["signature","seal","date","name","amount","text","checkbox"]}}},"required":["contract_id"],"additionalProperties":false},"output_schema":{"type":"object","properties":{"contract_id":{"type":"string"},"field_count":{"type":"integer"},"fields":{"type":"array"}},"additionalProperties":true},"example":{"request":{"contract_id":"ct_..."},"response":{"contract_id":"ct_...","field_count":2,"fields":[]}},"version":"v1","status":"active","transport":"mcp","category":"contract_authoring","requires_approval":false,"annotations":{"title":"서명필드 자동배치","readOnlyHint":false,"destructiveHint":false,"idempotentHint":true}},{"name":"send_for_signature","title":"서명 요청 발송","description":"계약서를 카카오 알림톡(폴백 SMS)으로 발송. channel 로 카톡/SMS 를 선택할 수 있다(기본 auto = 알림톡 우선). dry_run=true(기본)면 미리보기 카드 + 과금 안내(이번 달 무료 쿼터 잔여/초과 시 990원) + confirmation_token(5분·1회·스냅샷 바인딩)만 반환. 실발송은 dry_run=false + 유효한 confirmation_token 필수(누락/만료/불일치 시 서버 무조건 거부, confirmation_required). 무료 쿼터(월 3건) 소진 + 결제수단 미등록이면 payment_method_required 로 거부. idempotency_key 로 중복 발송·중복 과금 차단. 단계상향 미충족·미배치 서명자 존재 시 발송 차단. 실발송 응답 status 는 \"queued\"(비동기 발송; 실제 채널은 check_status 로 확인).","permission":"contract:send","input_schema":{"type":"object","properties":{"contract_id":{"type":"string","minLength":1,"description":"대상 계약 id."},"channel":{"type":"string","enum":["auto","kakao_alimtalk","sms","lms"],"default":"auto","description":"발송 채널(SSOT MessageChannel + auto). auto = 알림톡 우선 → 실패 시 SMS/LMS 폴백."},"message":{"type":"string","maxLength":1000,"description":"서명 요청 메시지(정보성). ≤1,000자. 선택."},"dry_run":{"type":"boolean","default":true,"description":"기본 true(미리보기). false = 실발송(confirmation_token 필수)."},"confirmation_token":{"type":"string","description":"dry_run 미리보기에서 받은 1회용 토큰. dry_run=false 일 때 필수."},"idempotency_key":{"type":"string","description":"실발송 멱등키(24h TTL). 중복 시 최초 결과 재반환. 다른 페이로드면 duplicate_request."}},"required":["contract_id"],"additionalProperties":false},"output_schema":{"type":"object","properties":{"would_send":{"type":"boolean","description":"dry_run 미리보기 여부."},"status":{"type":"string","description":"실발송 시 queued|sent."},"confirmation_token":{"type":"string","description":"dry_run 시 발급되는 1회용 토큰."},"billing":{"type":"object","description":"free_quota·free_remaining·amount_krw."},"channel_used":{"type":["string","null"]}},"additionalProperties":true},"example":{"request":{"contract_id":"ct_...","dry_run":true,"channel":"kakao_alimtalk"},"response":{"would_send":true,"confirmation_token":"cft_...","billing":{"free_remaining":2}}},"version":"v1","status":"active","transport":"mcp","category":"delivery","requires_approval":true,"annotations":{"title":"서명 요청 발송","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true}},{"name":"check_status","title":"상태 조회","description":"계약·서명 진행 상태를 조회한다(readOnly). 출력: { status, channel_used, signers[]{name,role,signed,signed_at,auth_verified,viewed_at,decline_reason}, expires_at, next_poll_after_sec }. next_poll_after_sec(기본 30) 로 폴링 백오프를 권고(과도 폴링 rate limit 방지).","permission":"contract:read","input_schema":{"type":"object","properties":{"contract_id":{"type":"string","minLength":1,"description":"조회할 계약 id."}},"required":["contract_id"],"additionalProperties":false},"output_schema":{"type":"object","properties":{"status":{"type":"string"},"channel_used":{"type":["string","null"]},"signers":{"type":"array","description":"{name,role,signed,signed_at,auth_verified}."},"next_poll_after_sec":{"type":"integer"}},"additionalProperties":true},"example":{"request":{"contract_id":"ct_..."},"response":{"status":"sent","signers":[{"role":"채무자","signed":false}],"next_poll_after_sec":30}},"version":"v1","status":"active","transport":"mcp","category":"contract_read","requires_approval":false,"annotations":{"title":"상태 조회","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true}},{"name":"get_signed_document","title":"완료 문서·보존본 조회","description":"체결 완료(completed) 계약의 보존본 단기 presigned URL(기본 5분) + audit trail + 무결성 해시를 반환한다(readOnly). 미완료면 document_url 대신 available_after 또는 종료사유(declined/expired)를 반환(미완성 문서 유출 방지). 출력: { status, document_url, audit_trail_url, completed_at, hash_sha256, tsa_token_present, retention_until }. tsa_token_present=false 여도 계약은 유효(타임스탬프는 증거력 보강 옵션).","permission":"document:read","input_schema":{"type":"object","properties":{"contract_id":{"type":"string","minLength":1,"description":"문서를 가져올 계약 id."},"format":{"type":"string","enum":["pdf"],"default":"pdf","description":"보존본 포맷(MVP: pdf 고정)."}},"required":["contract_id"],"additionalProperties":false},"output_schema":{"type":"object","properties":{"available":{"type":"boolean"},"document_url":{"type":["string","null"],"description":"단기 presigned URL(완료 시)."},"hash_sha256":{"type":["string","null"]},"tsa_token_present":{"type":"boolean"}},"additionalProperties":true},"example":{"request":{"contract_id":"ct_..."},"response":{"available":true,"document_url":"https://...","hash_sha256":"...","tsa_token_present":true}},"version":"v1","status":"active","transport":"mcp","category":"documents","requires_approval":false,"annotations":{"title":"완료 문서·보존본 조회","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true}},{"name":"list_contracts","title":"계약 문서함 조회","description":"내 계약 문서함을 조회한다(readOnly). status 필터로 보낸/진행/체결 문서함을 구분 — completed = 체결 완료 문서함(양 당사자 열람), sent·partially_signed = 진행 중, draft·ready = 임시저장. 출력: { contracts:[{ contract_id, title, contract_type, status, amount_krw, created_at, completed_at }], next_offset }. 체결 완료 문서는 수정 불가(불변)이며 보존본은 get_signed_document 로 받는다.","permission":"contract:read","input_schema":{"type":"object","properties":{"status":{"type":"string","enum":["draft","ready","sent","partially_signed","completed","archived","declined","expired","voided","deleted"],"description":"상태 필터(선택). completed = 체결 문서함."},"limit":{"type":"integer","minimum":1,"maximum":100,"default":20,"description":"페이지 크기(기본 20)."},"offset":{"type":"integer","minimum":0,"default":0,"description":"페이지 오프셋."}},"required":[],"additionalProperties":false},"output_schema":{"type":"object","properties":{"contracts":{"type":"array","description":"{contract_id,title,contract_type,status,amount_krw}."},"next_offset":{"type":["integer","null"]}},"additionalProperties":true},"example":{"request":{"status":"completed","limit":20},"response":{"contracts":[{"contract_id":"ct_...","title":"차용증","status":"completed"}],"next_offset":null}},"version":"v1","status":"active","transport":"mcp","category":"contract_read","requires_approval":false,"annotations":{"title":"계약 문서함 조회","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true}},{"name":"get_usage","title":"사용량·무료쿼터 조회","description":"이번 달 발송 사용량과 무료 쿼터(월 3건)를 조회한다(readOnly). 발송 전 비용 안내에 사용 — 무료 잔여가 있으면 0원, 소진 시 건당 990원(VAT 별도)이며 결제수단 등록이 필요하다. 출력: { period, free_quota, free_used, free_remaining, paid_count, paid_amount_krw, next_send_price_krw }.","permission":"contract:read","input_schema":{"type":"object","properties":{},"required":[],"additionalProperties":false},"output_schema":{"type":"object","properties":{"period":{"type":"string"},"free_quota":{"type":"integer"},"free_remaining":{"type":"integer"},"next_send_price_krw":{"type":"integer"}},"additionalProperties":true},"example":{"request":{},"response":{"period":"2026-06","free_quota":3,"free_remaining":2,"next_send_price_krw":0}},"version":"v1","status":"active","transport":"mcp","category":"billing","requires_approval":false,"annotations":{"title":"사용량·무료쿼터 조회","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true}}]}