Skip to main content
Glama

get_attachments

Read-onlyIdempotent

MyDART MCP의 get_attachments 도구는 공시의 첨부파일 목록과 형제문서 본문·페이지 이미지를 다룹니다.

[Purpose]

  • Attachment list + 형제문서 routing; body text = mode=text. 감사보고서·주석은 download_document(role).

  • 자금부정통제 붙임·경영진 운영실태보고서 live here (mode=text; 붙임 = attachment_links[].retrieve).

  • Scan-only (도장·서명·스캔 서식): mode=images only.

[Usage]

  1. 정관·영업보고서 본문 → list 로 dcm_no 확보 → dcm_no, mode="text"

  2. 표가 이미지뿐이면 mode="images" (뒷장 image_from, PDF 페이지 pages)

[Response]

  • format: hwpx/hwp/pdf/docx/doc/xlsx/xls/zip/html/unknown

  • images: source="viewer" or "pdf" — different field shapes.

[Rules]

  • supported:false → unsupported_reason·suggestion·note·retrieve·next_step = the fallback route; follow it verbatim.

  • No bulk sweeps — mass viewer calls bring DART IP bans.

  • Ladder: text (표 lossless) → empty·링크 껍데기 body → images → download_url. Attachment files are never parsed server-side.

  • images returns pictures: OCR·판독 is the client's job, 1 image per capped call (image_from).

  • partial:true ⇒ section_errors[]; markdown is partial — 빈 곳 ≠ 사실 없음.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNolist: the attachment list only — nothing is downloaded, so it is the cheap call. text: the document body as 마크다운 via the 뷰어 원문 (XML→HTML) path — it skips PDF conversion, so text and tables are lossless and it is hundreds of times lighter. The primary path for sibling documents (정관·영업보고서·운영보고서 etc.) and the route to take whenever body text is what you want. images: return embedded images (도장·스캔본·차트 and other raster that text cannot capture). With NO filename/index it takes the 뷰어 원본 JPEG route (manifest.source="viewer": originals in document order, per-section eleId); with filename or index it scans THAT attachment PDF instead (source="pdf": decoded PNGs, largest area first, with page numbers; pages narrows it). The two routes return different field shapes. There is no file-parsing mode: an attachment file itself is reached through download_url, never parsed server-side.list
indexNo0-based index of the attachment to scan, in images mode (filename takes precedence). Like filename it picks the PDF-scan route; omit both to get the 뷰어 임베드 원본 JPEG.
pagesNoPage filter for images mode (1-based, PDF-scan path only). e.g. "3", "1-5", "2,4,7-9". It narrows pages WITHIN the attachment picked by filename/index, so it requires one of them. Unset on a filename/index call = a scan of only that PDF's FIRST 40 pages. At most 2000 pages per call — a wider span is rejected, not silently trimmed.
dcm_noNoTarget 문서번호(dcmNo). Defaults to the 본문 document. One 공시(rcept_no) carries, besides the 본문, sibling documents (감사보고서·내부회계관리제도운영보고서·영업보고서·정관 etc.) each with its own dcmNo; take sibling_documents[].dcm_no from a list result to read that document (list its attachments, or mode=text/images). A sibling's attachments are invisible without it — always list first, then pass sibling_documents[].dcm_no.
filenameNoExact filename of the attachment to scan, in images mode (no partial-match fallback). Giving it PICKS the PDF-scan route — omit both filename and index to get the document's 뷰어 임베드 원본 JPEG instead. An EXACT match is required; on failure the error lists the available names.
rcept_noYes14-digit 접수번호 (separators are stripped automatically)
sectionsNoWhich sections to fetch, in mode="text" — the **sections[] array index** (0-based). NOT the eleId: in these documents eleId runs "1".."8", so eleId happens to equal index+1 and is easy to confuse. e.g. to read the 3rd and 6th entries of sections[], pass [2, 5]. Unset = the previous behavior (the first 24 sections, all fetched). [] = 목차 only — zero body calls, sections[] carries just the titles (md_chars all 0); read them, then call again with the indices you want (2-pass). The pick happens BEFORE the 24-node ceiling, so it reaches sections 25~158 of a 사업보고서 본문 that are otherwise unreachable at any truncate_at. Max 24 picks; out-of-range indices are dropped with a note in `notes` (all-out-of-range is rejected). In this mode every sections[] entry carries its own index — check it against what you asked for (an off-by-one that stays in range otherwise returns a neighbouring section silently).
image_fromNoStart offset in document order for the 뷰어 원본 JPEG route (0-based, default 0). Channels with a response cap fit only ~1 scan page per call, so this is how you reach later pages — e.g. the 자금부정통제 표 is usually the 2nd page of an 운영실태보고서, so image_from=1. The response carries `from` and a note telling you the next offset. PDF-scan route uses pages instead.
max_imagesNoMax images returned in images mode (largest area first). Default 12.
truncate_atNoMax length of the mode=text 마크다운 (default 100,000 chars; out-of-range values are clamped to the bound)
min_dimensionNoIn images mode, an image whose shorter side is under this many pixels is treated as decoration (아이콘·괘선) and dropped. Default 24. Lower it to catch small 도장/서명. It filters the PDF-scan path only (source:"pdf") — 뷰어 원본 JPEG images pass through unfiltered.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / pages / description
      Previous value: -"Page filter for images mode (1-based, PDF-scan path only). e.g. \"3\", \"1-5\", \"2,4,7-9\". It narrows pages WITHIN the attachment picked by filename/index, so it requires one of them. Unset on a filename/index call = a scan of only that PDF's FIRST 40 pages."New value: +"Page filter for images mode (1-based, PDF-scan path only). e.g. \"3\", \"1-5\", \"2,4,7-9\". It narrows pages WITHIN the attachment picked by filename/index, so it requires one of them. Unset on a filename/index call = a scan of only that PDF's FIRST 40 pages. At most 2000 pages per call — a wider span is rejected, not silently trimmed."
  2. Changed1 schema field changed
    • changedInput schema / properties / sections / description
      Previous value: -"Which sections to fetch, in mode=\"text\" — the **sections[] array index** (0-based). NOT the eleId: in these documents eleId runs \"1\"..\"8\", so eleId happens to equal index+1 and is easy to confuse. e.g. to read the 3rd and 6th entries of sections[], pass [2, 5]. Unset = the previous behavior (the first 24 sections, all fetched). [] = 목차 only — zero body calls, sections[] carries just the titles (md_chars all 0); read them, then call again with the indices you want (2-pass). The pick happens BEFORE the 24-node ceiling, so it reaches sections 25~158 of a 사업보고서 본문 that are otherwise unreachable at any truncate_at. Max 24 picks; out-of-range indices are dropped with a warning (all-out-of-range is rejected). In this mode every sections[] entry carries its own index — check it against what you asked for (an off-by-one that stays in range otherwise returns a neighbouring section silently)."New value: +"Which sections to fetch, in mode=\"text\" — the **sections[] array index** (0-based). NOT the eleId: in these documents eleId runs \"1\"..\"8\", so eleId happens to equal index+1 and is easy to confuse. e.g. to read the 3rd and 6th entries of sections[], pass [2, 5]. Unset = the previous behavior (the first 24 sections, all fetched). [] = 목차 only — zero body calls, sections[] carries just the titles (md_chars all 0); read them, then call again with the indices you want (2-pass). The pick happens BEFORE the 24-node ceiling, so it reaches sections 25~158 of a 사업보고서 본문 that are otherwise unreachable at any truncate_at. Max 24 picks; out-of-range indices are dropped with a note in `notes` (all-out-of-range is rejected). In this mode every sections[] entry carries its own index — check it against what you asked for (an off-by-one that stays in range otherwise returns a neighbouring section silently)."
  3. Changed1 schema field changed
    • addedInput schema / additionalProperties
      Added value: +false
  4. Changed9 schema fields changed
    • changedInput schema / properties / dcm_no / description
      Previous value: -"Target 문서번호(dcmNo). Defaults to the 본문 document. One 공시(rcept_no) carries, besides the 본문, sibling documents (감사보고서·내부회계관리제도운영보고서·영업보고서·정관 etc.) each with its own dcmNo; take sibling_documents[].dcm_no from a list result to list/extract that document's attachments. A sibling's attachments are invisible without it — always list first, then pass sibling_documents[].dcm_no."New value: +"Target 문서번호(dcmNo). Defaults to the 본문 document. One 공시(rcept_no) carries, besides the 본문, sibling documents (감사보고서·내부회계관리제도운영보고서·영업보고서·정관 etc.) each with its own dcmNo; take sibling_documents[].dcm_no from a list result to read that document (list its attachments, or mode=text/images). A sibling's attachments are invisible without it — always list first, then pass sibling_documents[].dcm_no."
    • changedInput schema / properties / filename / description
      Previous value: -"Exact filename, in extract mode (no partial-match fallback). An EXACT match is required; on failure the error lists the available names."New value: +"Exact filename of the attachment to scan, in images mode (no partial-match fallback). Giving it PICKS the PDF-scan route — omit both filename and index to get the document's 뷰어 임베드 원본 JPEG instead. An EXACT match is required; on failure the error lists the available names."
    • changedInput schema / properties / index / description
      Previous value: -"0-based index, in extract mode (filename takes precedence)"New value: +"0-based index of the attachment to scan, in images mode (filename takes precedence). Like filename it picks the PDF-scan route; omit both to get the 뷰어 임베드 원본 JPEG."
    • changedInput schema / properties / mode / description
      Previous value: -"list: the attachment list only — nothing is downloaded, so it is the cheap call. text: the document body as 마크다운 via the 뷰어 원문 (XML→HTML) path — it skips PDF conversion, so text and tables are lossless and it is hundreds of times lighter. The primary path for sibling documents (정관·영업보고서·운영보고서 etc.). extract: download and parse ONE attachment file (PDF/HWP/HWPX/DOCX/XLSX) into 마크다운 — when an actual file is the target, and the fallback when the 뷰어 cannot serve the body (supported:false, or a 껍데기 document whose body is just a PDF link) or when the original layout·날인 must be seen. images: return embedded images (도장·스캔본·차트 and other raster that text cannot capture) — 뷰어 원본 JPEG first (manifest.source=\"viewer\": originals in document order, per-section eleId), or a PDF page scan when pages is given (source=\"pdf\": decoded PNGs, largest area first, with page numbers). The two routes return different field shapes."New value: +"list: the attachment list only — nothing is downloaded, so it is the cheap call. text: the document body as 마크다운 via the 뷰어 원문 (XML→HTML) path — it skips PDF conversion, so text and tables are lossless and it is hundreds of times lighter. The primary path for sibling documents (정관·영업보고서·운영보고서 etc.) and the route to take whenever body text is what you want. images: return embedded images (도장·스캔본·차트 and other raster that text cannot capture). With NO filename/index it takes the 뷰어 원본 JPEG route (manifest.source=\"viewer\": originals in document order, per-section eleId); with filename or index it scans THAT attachment PDF instead (source=\"pdf\": decoded PNGs, largest area first, with page numbers; pages narrows it). The two routes return different field shapes. There is no file-parsing mode: an attachment file itself is reached through download_url, never parsed server-side."
    • changedInput schema / properties / mode / enum
      Previous value: -[
      -  "list",
      -  "text",
      -  "extract",
      -  "images"
      -]New value: +[
      +  "list",
      +  "text",
      +  "images"
      +]
    • removedInput schema / properties / outline_max_items
      Removed value: -{
      -  "default": 50,
      -  "description": "Max outline(목차) entries. A 사업보고서 outline runs to thousands → default 50. 0 = omit the outline.",
      -  "maximum": 500,
      -  "minimum": 0,
      -  "type": "integer"
      -}
    • changedInput schema / properties / pages / description
      Previous value: -"Page filter for images mode (1-based, PDF-scan path only). e.g. \"3\", \"1-5\", \"2,4,7-9\". When given, a PDF is fetched instead of the 뷰어 JPEG and those pages are scanned (pass the value text_quality.next_step hands you, or feed text_quality's ocr_candidate_pages / image_only_pages as-is — do not hand-scan the markdown for page numbers). When unset: 뷰어 원본 JPEG first, else a scan of only the PDF's FIRST 40 pages."New value: +"Page filter for images mode (1-based, PDF-scan path only). e.g. \"3\", \"1-5\", \"2,4,7-9\". It narrows pages WITHIN the attachment picked by filename/index, so it requires one of them. Unset on a filename/index call = a scan of only that PDF's FIRST 40 pages."
    • changedInput schema / properties / truncate_at / description
      Previous value: -"Max length of the extract 마크다운 (default 100,000 chars; out-of-range values are clamped to the bound)"New value: +"Max length of the mode=text 마크다운 (default 100,000 chars; out-of-range values are clamped to the bound)"
    • removedInput schema / properties / zip_index
      Removed value: -{
      -  "description": "Index of the file inside a ZIP attachment when extracting (0-based) — that inner file is the one parsed into 마크다운. If unset and the attachment is a ZIP, only the inner file list is returned. Use entries[].index verbatim (it indexes ALL inner files — do not guess).",
      -  "minimum": 0,
      -  "type": "integer"
      -}
  5. Changed1 schema field changed
    • addedInput schema / properties / image_from
      Added value: +{
      +  "default": 0,
      +  "description": "Start offset in document order for the 뷰어 원본 JPEG route (0-based, default 0). Channels with a response cap fit only ~1 scan page per call, so this is how you reach later pages — e.g. the 자금부정통제 표 is usually the 2nd page of an 운영실태보고서, so image_from=1. The response carries `from` and a note telling you the next offset. PDF-scan route uses pages instead.",
      +  "minimum": 0,
      +  "type": "integer"
      +}
  6. Changed1 schema field changed
    • addedInput schema / properties / sections
      Added value: +{
      +  "description": "Which sections to fetch, in mode=\"text\" — the **sections[] array index** (0-based). NOT the eleId: in these documents eleId runs \"1\"..\"8\", so eleId happens to equal index+1 and is easy to confuse. e.g. to read the 3rd and 6th entries of sections[], pass [2, 5]. Unset = the previous behavior (the first 24 sections, all fetched). [] = 목차 only — zero body calls, sections[] carries just the titles (md_chars all 0); read them, then call again with the indices you want (2-pass). The pick happens BEFORE the 24-node ceiling, so it reaches sections 25~158 of a 사업보고서 본문 that are otherwise unreachable at any truncate_at. Max 24 picks; out-of-range indices are dropped with a warning (all-out-of-range is rejected). In this mode every sections[] entry carries its own index — check it against what you asked for (an off-by-one that stays in range otherwise returns a neighbouring section silently).",
      +  "items": {
      +    "minimum": 0,
      +    "type": "integer"
      +  },
      +  "maxItems": 24,
      +  "type": "array"
      +}
  7. Changed6 schema fields changed
    • changedInput schema / properties / dcm_no / description
      Previous value: -"Target 문서번호(dcmNo). Defaults to the 본문 document. One 공시(rcept_no) carries, besides the 본문, sibling documents (감사보고서·내부회계관리제도운영보고서·영업보고서·정관 etc.) each with its own dcmNo; take sibling_documents[].dcm_no from a list result to list/extract that document's attachments."New value: +"Target 문서번호(dcmNo). Defaults to the 본문 document. One 공시(rcept_no) carries, besides the 본문, sibling documents (감사보고서·내부회계관리제도운영보고서·영업보고서·정관 etc.) each with its own dcmNo; take sibling_documents[].dcm_no from a list result to list/extract that document's attachments. A sibling's attachments are invisible without it — always list first, then pass sibling_documents[].dcm_no."
    • changedInput schema / properties / filename / description
      Previous value: -"Exact filename, in extract mode (no partial-match fallback)"New value: +"Exact filename, in extract mode (no partial-match fallback). An EXACT match is required; on failure the error lists the available names."
    • changedInput schema / properties / min_dimension / description
      Previous value: -"In images mode, an image whose shorter side is under this many pixels is treated as decoration (아이콘·괘선) and dropped. Default 24. Lower it to catch small 도장/서명."New value: +"In images mode, an image whose shorter side is under this many pixels is treated as decoration (아이콘·괘선) and dropped. Default 24. Lower it to catch small 도장/서명. It filters the PDF-scan path only (source:\"pdf\") — 뷰어 원본 JPEG images pass through unfiltered."
    • changedInput schema / properties / mode / description
      Previous value: -"list: the attachment list only. text: the document body as 마크다운 via the 뷰어 원문 (XML→HTML) path — it skips PDF conversion, so text and tables are lossless and it is hundreds of times lighter. The primary path for sibling documents (정관·영업보고서·운영보고서 etc.). extract: download and parse ONE attachment file (PDF/HWP etc.) into 마크다운 — when an actual file is the target. images: return embedded images (도장·스캔본·차트 and other raster that text cannot capture) — 뷰어 원본 JPEG first, or a PDF page scan when pages is given."New value: +"list: the attachment list only — nothing is downloaded, so it is the cheap call. text: the document body as 마크다운 via the 뷰어 원문 (XML→HTML) path — it skips PDF conversion, so text and tables are lossless and it is hundreds of times lighter. The primary path for sibling documents (정관·영업보고서·운영보고서 etc.). extract: download and parse ONE attachment file (PDF/HWP/HWPX/DOCX/XLSX) into 마크다운 — when an actual file is the target, and the fallback when the 뷰어 cannot serve the body (supported:false, or a 껍데기 document whose body is just a PDF link) or when the original layout·날인 must be seen. images: return embedded images (도장·스캔본·차트 and other raster that text cannot capture) — 뷰어 원본 JPEG first (manifest.source=\"viewer\": originals in document order, per-section eleId), or a PDF page scan when pages is given (source=\"pdf\": decoded PNGs, largest area first, with page numbers). The two routes return different field shapes."
    • changedInput schema / properties / pages / description
      Previous value: -"Page filter for images mode (1-based, PDF-scan path only). e.g. \"3\", \"1-5\", \"2,4,7-9\". When given, a PDF is fetched instead of the 뷰어 JPEG and those pages are scanned (pass the value text_quality.next_step hands you). When unset: 뷰어 원본 JPEG first, else a scan of the PDF's first 40 pages."New value: +"Page filter for images mode (1-based, PDF-scan path only). e.g. \"3\", \"1-5\", \"2,4,7-9\". When given, a PDF is fetched instead of the 뷰어 JPEG and those pages are scanned (pass the value text_quality.next_step hands you, or feed text_quality's ocr_candidate_pages / image_only_pages as-is — do not hand-scan the markdown for page numbers). When unset: 뷰어 원본 JPEG first, else a scan of only the PDF's FIRST 40 pages."
    • changedInput schema / properties / zip_index / description
      Previous value: -"Index of the file inside a ZIP attachment when extracting (0-based). If unset and the attachment is a ZIP, only the inner file list is returned."New value: +"Index of the file inside a ZIP attachment when extracting (0-based) — that inner file is the one parsed into 마크다운. If unset and the attachment is a ZIP, only the inner file list is returned. Use entries[].index verbatim (it indexes ALL inner files — do not guess)."
  8. Changed11 schema fields changed
    • changedInput schema / properties / dcm_no / description
      Previous value: -"대상 문서번호(dcmNo). 미지정 시 본문 문서. 한 공시(rcept_no)엔 본문 외에 형제 문서들(감사보고서·내부회계관리제도운영보고서·영업보고서·정관 등)이 각자 dcmNo로 딸려오며, list 결과의 sibling_documents[].dcm_no 로 그 문서의 첨부 파일을 list/extract 한다."New value: +"Target 문서번호(dcmNo). Defaults to the 본문 document. One 공시(rcept_no) carries, besides the 본문, sibling documents (감사보고서·내부회계관리제도운영보고서·영업보고서·정관 etc.) each with its own dcmNo; take sibling_documents[].dcm_no from a list result to list/extract that document's attachments."
    • changedInput schema / properties / filename / description
      Previous value: -"extract 모드에서 정확한 파일명 (부분일치 폴백 없음)"New value: +"Exact filename, in extract mode (no partial-match fallback)"
    • changedInput schema / properties / index / description
      Previous value: -"extract 모드에서 0-based index (filename 우선)"New value: +"0-based index, in extract mode (filename takes precedence)"
    • changedInput schema / properties / max_images / description
      Previous value: -"images 모드 최대 반환 이미지 수 (면적 큰 순). 기본 12."New value: +"Max images returned in images mode (largest area first). Default 12."
    • changedInput schema / properties / min_dimension / description
      Previous value: -"images 모드에서 가로·세로 중 작은 변이 이 픽셀 미만이면 장식(아이콘·괘선)으로 보고 제외. 기본 24. 작은 도장/서명까지 잡으려면 낮춘다."New value: +"In images mode, an image whose shorter side is under this many pixels is treated as decoration (아이콘·괘선) and dropped. Default 24. Lower it to catch small 도장/서명."
    • changedInput schema / properties / mode / description
      Previous value: -"list: 첨부 목록만. text: 뷰어 원문(XML→HTML) 경로로 문서 본문을 마크다운으로 — PDF 변환을 안 거쳐 텍스트·표 무손실이고 수백 배 가볍다. 형제문서(정관·영업보고서·운영보고서 등) 1차 경로. extract: 첨부 파일(PDF/HWP 등) 하나를 다운·파싱해 마크다운 — 실물 파일이 대상일 때. images: 임베드 이미지(도장·스캔본·차트 등 텍스트로 안 잡히는 raster)를 이미지로 반환 — 뷰어 원본 JPEG 우선, pages 지정 시 PDF 페이지 스캔."New value: +"list: the attachment list only. text: the document body as 마크다운 via the 뷰어 원문 (XML→HTML) path — it skips PDF conversion, so text and tables are lossless and it is hundreds of times lighter. The primary path for sibling documents (정관·영업보고서·운영보고서 etc.). extract: download and parse ONE attachment file (PDF/HWP etc.) into 마크다운 — when an actual file is the target. images: return embedded images (도장·스캔본·차트 and other raster that text cannot capture) — 뷰어 원본 JPEG first, or a PDF page scan when pages is given."
    • changedInput schema / properties / outline_max_items / description
      Previous value: -"outline(목차) 최대 항목 수. 사업보고서 outline 은 수천 개 → 디폴트 50. 0=outline 생략."New value: +"Max outline(목차) entries. A 사업보고서 outline runs to thousands → default 50. 0 = omit the outline."
    • changedInput schema / properties / pages / description
      Previous value: -"images 모드 페이지 필터 (1-based, PDF 스캔 경로 전용). 예 \"3\", \"1-5\", \"2,4,7-9\". 지정하면 뷰어 JPEG 대신 PDF 를 받아 그 페이지들을 스캔한다(text_quality.next_step 이 주는 값을 그대로). 미지정 시 뷰어 원본 JPEG 우선, 없으면 PDF 앞 40페이지 스캔."New value: +"Page filter for images mode (1-based, PDF-scan path only). e.g. \"3\", \"1-5\", \"2,4,7-9\". When given, a PDF is fetched instead of the 뷰어 JPEG and those pages are scanned (pass the value text_quality.next_step hands you). When unset: 뷰어 원본 JPEG first, else a scan of the PDF's first 40 pages."
    • changedInput schema / properties / rcept_no / description
      Previous value: -"접수번호 14자리(구분자는 자동 제거)"New value: +"14-digit 접수번호 (separators are stripped automatically)"
    • changedInput schema / properties / truncate_at / description
      Previous value: -"extract 마크다운 최대 길이 (기본 10만 자, 범위 밖 값은 경계로 보정)"New value: +"Max length of the extract 마크다운 (default 100,000 chars; out-of-range values are clamped to the bound)"
    • changedInput schema / properties / zip_index / description
      Previous value: -"ZIP 첨부 extract 시 내부 파일 index (0-based). 미지정 & ZIP 인 경우 내부 파일 목록만 반환."New value: +"Index of the file inside a ZIP attachment when extracting (0-based). If unset and the attachment is a ZIP, only the inner file list is returned."
  9. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources