이미지 업로드 준비
prepare_image_upload의 인수, 결과 스키마, OAuth 권한, 안전 주석을 확인된 MCP 계약에서 생성한 레퍼런스입니다.
이 페이지의 내용
도구
prepare_image_upload
단기 직접 업로드를 준비합니다. 반환 URL·헤더로 정확히 byte_size 바이트를 PUT하고 complete_image_upload를 호출하세요.
권한 및 안전
OAuth 권한: files:write
| 안전 신호 | 값 |
|---|---|
destructiveHint |
false |
idempotentHint |
false |
openWorldHint |
true |
readOnlyHint |
false |
| spendsCredits | false |
| requiresUserConfirmation | false |
| sideEffects | temporary_upload_created |
주석은 안전 특성을 설명하며 사용자 동의, OAuth 승인, 서버 검사를 대체하지 않습니다.
입력 인수
| 필드 | 유형 | 필수 | 기본값 | 제약 | 설명 |
|---|---|---|---|---|---|
byte_size |
integer |
예 | — | exclusiveMinimum: 0 |
Exact number of bytes the client will PUT. |
filename |
string |
예 | — | minLength: 1; maxLength: 240 |
Client filename, not a local path the server can read. |
mime_type |
string |
예 | — | pattern: ^image/(png|jpeg|webp)$ |
Actual image MIME type. |
인수 예제
{
"byte_size": 1024,
"filename": "character.png",
"mime_type": "image/png"
}
구조화된 결과
| 필드 | 유형 | 필수 | 기본값 | 제약 | 설명 |
|---|---|---|---|---|---|
expires_at |
string |
예 | — | format: date-time |
Upload URL expiry. |
headers |
object |
예 | — | — | Exact transfer headers; do not add MCP tokens or API Bearer credentials. |
max_bytes |
integer |
예 | — | — | Maximum accepted upload byte count. |
method |
string |
아니요 | "PUT" |
const: "PUT" |
HTTP method the client must use for the byte transfer. |
upload_id |
string |
예 | — | format: uuid |
Upload session ID for complete_image_upload, not the final file_id. |
upload_url |
string |
예 | — | — | Sensitive short-lived upload URL. Transfer actual bytes; do not publish this URL. |
오류 및 다음 단계
도구 오류의 error 객체에는 code, message, retryable, request_id, details가 있습니다. 메시지 문구로 분기하거나 비공개 입력을 노출하지 마세요. 종료 실패 후에도 부분 출력을 확인하세요. 서명 URL은 저장된 파일이 아닙니다.
이 문서가 도움이 되었나요?
검색어, 코드 또는 자유 입력 텍스트는 수집하지 않습니다. 이 설정은 문서 상호작용 이벤트만 제어합니다. 개인정보 처리방침