> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tiro.ooo/llms.txt
> Use this file to discover all available pages before exploring further.

# 콘텐츠 수정·복구

> MCP로 전사 문단, 요약, 문서 섹션을 수정해요. 편집 상태를 먼저 읽고 사용자 확인을 거쳐 이전 수정이나 생성본으로 되돌릴 수 있어요.

모든 도구에 `noteGuid`를 보내세요. 편집용 단건 조회(`get_paragraph_content`, `get_note_summary`, `get_note_document_section`)는 별도 옵션 없이 본문과 `revision`, `editState.etag`를 반환해요. 수정할 때는 `revision`을 `expectedRevision`으로 보내세요. 모든 수정은 수정 이력에 남아요.

* 복원·되돌리기·초기화 전에는 바뀔 범위를 알려 주고 사용자에게 확인받으세요. 다른 사람의 수정도 되돌릴 수 있어요. `etag`를 받는 도구에는 확인 전에 읽은 `editState.etag`를 그대로 보내세요. 성공하면 본문을 다시 읽으세요.
* 도구 오류의 `status_code`가 `409`이고 `error_code`가 `CONTENT_CONFLICT`이면 최신 본문을 읽고 사용자에게 다시 확인하세요. 새 값으로 자동 재시도하지 마세요.
* 편집용 조회에서 본문이 5,000자를 넘으면 `413 CONTENT_TOO_LARGE`가 발생해요. 화자별 전사는 화자 라벨과 이름도 길이에 포함해요. 긴 본문은 Tiro 앱에서 수정하세요.

## 전사 문단

조회에는 `note:read`, 수정·복구에는 `note:write`가 필요해요. 문단은 `get_note_transcript`의 `uuid`를 `paragraphUuid`로 지정해요. 무료 한도를 넘어 잠긴 문단은 편집용 조회와 수정 모두 `409 CONTENT_NOT_EDITABLE`을 반환해요.

| 도구 | `noteGuid` 외 인자 | 하는 일 |
| - | - | - |
| `get_paragraph_content` | `paragraphUuid`, `field` | 문단 필드의 본문과 편집 상태를 읽어요. |
| `update_paragraph_content` | `paragraphUuid`, `field`, `expectedRevision`, `content` 또는 `segments` | 문단 필드 하나의 본문을 교체해요. |
| `restore_paragraph_content` | `paragraphUuid`, `field`, `expectedRevision` | 문단 필드 하나를 저장된 생성본으로 복원해요. |

`field`가 `transcript`나 `translated`이면 일반 텍스트를, `summary`이면 Markdown을 `content`에 보내세요. `diarized-transcript`이면 기존 순서와 개수에 맞춰 텍스트 문자열 배열을 `segments`에 보내세요. 화자 배정은 유지돼요.

다음은 `update_paragraph_content`가 반환하는 `structuredContent` 예시예요. 되돌리려면 `get_paragraph_content`로 다시 읽고 `editState.undoAvailable`과 `editState.etag`를 확인하세요.

```json theme={"system"}
{
  "edited": true,
  "revision": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}
```

## 노트 요약

조회에는 `note_summary:read`, 수정·복구에는 `note_summary:write`가 필요해요. `get_note`의 `include: ["summary"]`로 `summaryId`를 확인하세요.

| 도구 | `noteGuid` 외 인자 | 하는 일 |
| - | - | - |
| `get_note_summary` | `summaryId` | 요약 본문과 편집 상태를 읽어요. |
| `update_note_summary_content` | `summaryId`, `expectedRevision`, `content` | 요약 본문 전체를 Markdown으로 교체해요. |
| `restore_note_summary_content` | `summaryId`, `etag` 또는 `expectedRevision` | 요약을 저장된 생성본으로 복원해요. |

요약 복원에는 `etag`와 기존 방식의 `expectedRevision` 중 하나만 보내세요. `etag`로 초기화하면 이전 요약 수정을 더 이상 되돌릴 수 없어요.

## 문서 섹션

조회에는 `note_document:read`, 수정·복구에는 `note_document:write`가 필요해요. 섹션 조회와 수정 모두 노트 편집 권한이 필요해요. 섹션 조회 시 같은 워크스페이스의 `VIEWER`는 403, 다른 워크스페이스에서는 404를 받아요. `get_note`의 `include: ["documents"]`로 `documentId`와 `sectionId`를 확인하세요.

| 도구 | `noteGuid` 외 인자 | 하는 일 |
| - | - | - |
| `get_note_document_section` | `documentId`, `sectionId` | 문서 섹션 하나의 본문과 편집 상태를 읽어요. |
| `update_note_document_section_content` | `documentId`, `sectionId`, `expectedRevision`, `content` | 섹션 하나의 본문 전체를 Markdown으로 교체해요. |

## 되돌리기·초기화

되돌리기는 마지막 수정 한 건을 취소해요. 초기화하면 대상 범위의 이전 수정을 더 이상 되돌릴 수 없어요.

`reset_paragraph_contents`나 `undo_note_speakers`를 호출하기 전에 `get_note_transcript`에 `includeEditState: true`를 보내 문단의 `editState.etag`를 읽으세요. 요약이나 문서의 복구 상태는 `get_note`에 같은 옵션을 보내면 `include`로 선택한 `summary`와 `documents`에만 붙어요. 기본값은 `false`예요. 전사 복구 상태를 만들 수 없으면 본문은 그대로 반환하고 모든 문단에서 `editState`를 생략해요.

| 도구 | `noteGuid` 외 인자 | 하는 일 |
| - | - | - |
| `undo_paragraph_content` | `paragraphUuid`, `field`, `etag` | 한 문단 필드의 마지막 수정을 되돌려요. |
| `reset_paragraph` | `paragraphUuid`, `etag` | 한 문단의 원문·번역·화자별 텍스트와 화자 배정을 초기화해요. 문단 요약은 유지해요. |
| `reset_paragraph_contents` | `kind`, `etag` | 모든 문단에서 선택한 종류를 초기화해요. `original`은 화자 배정도 초기화해요. |
| `undo_note_speakers` | `etag` | 노트의 마지막 화자 배정 변경을 되돌려요. 이후에 수정한 텍스트는 유지해요. |
| `undo_note_summary_content` | `summaryId`, `etag` | 요약의 마지막 수정을 되돌려요. |
| `undo_note_document_content` | `documentId`, `etag` | 문서에서 마지막으로 저장한 섹션 수정 한 건을 되돌려요. |
| `reset_note_document_content` | `documentId`, `etag` | 문서의 모든 섹션을 저장된 생성본으로 복원해요. |

`reset_paragraph_contents`를 호출하기 전에 `editState.canResetByKind`에서 `kind` 값(`original`, `translated`, `summary`)을 확인하세요. 문서 초기화는 문서 전체에 적용돼요.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.