download_document
MyDART MCP의 download_document 도구는 공시 원문을 마크다운으로 읽고 검색합니다(heading·표 구조 보존). 감사보고서·주석별 조회 포함.
[Purpose]
Full disclosure text; audit analysis (감사의견·KAM): get_audit_report.
감사보고서·연결감사보고서 원문·주석: here (role·sections), not get_attachments.
비상장 non-filers: the F 감사보고서 rcept IS the route to 재무제표·주석.
ZIP 밖 형제문서(정관·운영실태보고서)·스캔: get_attachments. XBRL: get_financials(rcept_no).
[Usage]
"이 사업보고서 원문 읽어줘" → rcept_no="20260310002820"
"연결감사보고서 특수관계자 주석" → role="consolidated_audit", sections=["특수관계자"]
"원문에서 횡령·배임 찾아줘" → find=["횡령","배임"]
[Response]
documents[]: metadata only (role per 원문) — content ONLY with all_docs=true
[Rules]
감사의견·KAM·주석 are in 별도(_00760)/연결(_00761), not the 본문: pick by role.
Long doc: sections=[] → outline (헤딩 + 주석 번호별), then sections=[index|제목].
find = 표 단위 발췌 from every doc. 0 matches ≠ absent — 스캔 이미지 표는 get_attachments(mode=images).
truncated=true → raise truncate_at or pick sections.
원문 XML 없음([014]) → 뷰어 자동 전환(source=viewer): documents[]·doc_index = 뷰어 섹션.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| find | No | Full-text search over EVERY 원문 XML in the ZIP (본문+별도/연결 감사보고서). Returns `find` (표 단위 발췌 bundles + 나머지 매치 위치 locations) INSTEAD of content — 전문을 나르지 않는다. Several expressions in the same filing → ONE call with an array (최대 8개, OR 검색: ["차등","포기","주주평등"]) — the document is converted once; splitting into parallel calls repeats that work. 배열이면 여러 검색어가 함께 나오는 블록이 먼저 오고 bundles[].terms·per_term 이 붙는다. A single string is ONE literal term (쉼표로 나열해도 나뉘지 않는다). Case-insensitive, 리터럴 매칭(정규식 아님 — `(주)카카오` 를 그대로 넣어도 된다). 0건이면 표기를 자간 띄운 형태(`핵 심 감 사 사 항`)로 한 번 더 찾는다. doc_index 를 함께 주면 그 문서 하나로 좁힌다(범위 밖이면 좁히지 않고 전 문서를 검색하고 notes 로 알린다 — 전문 조회의 index-0 폴백과 다르다: 잘못된 index 로 좁히면 답이 있는데 0건이 나간다). bundles[]·locations[] 의 section_index 를 같은 doc_index(또는 role)와 sections=[i] 로 넘기면 그 절·주석 전체가 온다(note_title = 어느 주석인지). format=markdown 에서만 쓸 수 있다. [014] filing (source=viewer): 상위 뷰어 섹션(앞 24개 — 하위 섹션은 그 안에서)을 검색하고 bundles[].doc_index 가 섹션 index 다. | |
| role | No | Selects the 원문 by role instead of doc_index — separate_audit = 감사보고서(별도, `_00760`), consolidated_audit = 연결감사보고서(`_00761`), internal_control, main_body. Use it instead of guessing doc_index. If the ZIP has no such 원문 (e.g. no 연결 for a company without subsidiaries) the call fails with the document list. Not with doc_index or all_docs; with find it narrows the search to that 원문. | |
| format | No | Output format. markdown=DART XML → 마크다운, raw=original XML, text=tags stripped (table structure is lost). A [014] filing (no 원문 XML → 뷰어 자동 전환, source=viewer) has no raw; markdown/text convert the 뷰어 HTML. | markdown |
| all_docs | No | Convert every 원문 XML in the ZIP and return them as documents[] — the 사업보고서 본문 plus 별도/연결 감사보고서 in one call. In a [014] filing (source=viewer) it returns one entry per top-level 뷰어 섹션 (up to 24; sub-sections are inside their parent). | |
| rcept_no | Yes | 14-digit 접수번호 (the rcept_no from search_disclosures). Hyphens and spaces are stripped. | |
| sections | No | Read only PART of the selected 원문 (role/doc_index; 본문 when omitted). [] = 목차(outline) only, no content: rows of index·level·title·char_count, and under each 주석 heading one row per 주석 number (주석 경계는 'N.' 번호로 추정). Then pick by outline index (numbers, e.g. [12, 40]), by 제목 부분일치 (strings, e.g. ["특수관계자","우발"] — 공백 무시; 연결·별도 주석이 둘 다 있으면 둘 다), or by 주석 번호 ("주석 31"). Max 24 picks; a pick inside another picked range comes back once. No match → the outline comes back instead of content. truncate_at caps the total. In a [014] filing (source=viewer) the outline is the 뷰어 목차 (numbers = documents[].index, strings = 제목). format=markdown only; not with find or all_docs. | |
| doc_index | No | Selects one 원문 XML inside the ZIP (0-based; 0=본문 when omitted). Use the index from the documents list. For a 감사보고서 use role (separate_audit / consolidated_audit) instead of guessing 1~2. An out-of-range value silently falls back to the main body WITH a note in `notes` — check it. In a [014] filing (source=viewer) it picks one 뷰어 목차 섹션 instead — the same index as get_attachments mode=text sections. | |
| truncate_at | No | Max text length (the excess is cut). Default 300,000 chars; out-of-range values are clamped to the bound. With all_docs=true the budget is divided across the documents (the per-document share comes back as per_doc_truncate_at). Ignored when find is set (no content is returned). | |
| find_max_bytes | No | 발췌 본문 합계의 UTF-8 **바이트** 상한 (기본 12,000). 문자수가 아니라 바이트인 이유: 한글은 자당 3바이트라 '12,000자' 로 재면 응답이 36,000B 가 된다(실측). 단일 발췌가 이 값을 넘으면 표 행 단위로 잘리고 clipped=true 가 붙는다(제목행·구분행은 보존). | |
| find_max_bundles | No | Max 발췌 bundles (기본 5). 나머지 매치는 locations 로 위치만 나열된다. 바이트 예산(find_max_bytes)이 먼저 차면 이 수에 못 미칠 수 있다. |