

 AWS Partner Central API 참조가 재구성되었습니다. 지원되는 API 작업에 대한 자세한 내용은 [AWS Partner Central API 참조](https://docs.aws.amazon.com/partner-central/latest/APIReference/Welcome.html)를 참조하세요.

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

# 도구 참조
<a name="mcp-tools-reference"></a>

파트너 중앙 에이전트 MCP 서버는 `sendMessage` 모든 에이전트 상호 작용과 세션 상태 `getSession` 검색이라는 두 가지 MCP 도구를 제공합니다. 기회 쿼리, 자금 지원 애플리케이션, 문서 분석 등 모든 Partner Central 운영은를 통해 자연어를 통해 처리됩니다`sendMessage`.

## 도구 개요
<a name="mcp-tools-overview"></a>


| 도구 | 설명 | 카테고리 | 
| --- | --- | --- | 
| sendMessage | Partner Central AI 에이전트에게 메시지를 전송합니다. 텍스트, 파일 첨부 파일 및 human-in-the-loop 승인 응답을 지원합니다. | 읽기/쓰기 | 
| getSession | 대화 기록, 이벤트 및 메타데이터를 포함한 세션 상태를 검색합니다. | 읽기 전용 | 

## `sendMessage`
<a name="mcp-tool-sendmessage"></a>

모든 Partner Central AI 에이전트 상호 작용을 위한 기본 도구입니다. 이 도구를 사용하여 질문하고, 작업을 요청하고, 분석할 문서를 첨부하고, 쓰기 작업에 대한 승인 요청에 응답할 수 있습니다.

에이전트는 세션 내에서 대화 컨텍스트를 유지하므로 이전 컨텍스트를 반복하지 않고도 후속 질문을 할 수 있습니다.

### 파라미터
<a name="mcp-sendmessage-parameters"></a>
+ `content` (필수) - 콘텐츠 블록의 배열입니다. 각 블록에는 블록 구조를 결정하는 `type` 필드가 포함되어야 합니다. 단일 메시지(예: 텍스트 \+ 문서 첨부 파일)에 여러 블록을 포함할 수 있습니다.

  콘텐츠 블록 유형:    
[See the AWS documentation website for more details](http://docs.aws.amazon.com/ko_kr/partner-central/latest/developer-guide/mcp-tools-reference.html)
+ `catalog` (필수) - 작업의 대상 환경입니다.

  유효한 값: `"AWS"` (프로덕션), `"Sandbox"` (테스트)
+ `sessionId` (선택 사항) - 계속할 기존 세션을 식별하는 UUID v4입니다. 새 세션을 생성하려면 생략합니다. 형식: `session-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`

  기본값: 새 세션이 자동으로 생성됩니다.
+ `stream` (선택 사항) - 실시간 응답 전송을 위해 Server-Sent Events(SSE) 스트리밍을 활성화합니다.

  유효값: `true`, `false` 

  기본값: `false`

### 응답
<a name="mcp-sendmessage-response"></a>

 응답에는 다음이 포함됩니다.


| 필드 | 설명 | 
| --- | --- | 
| sessionId | 후속 메시지의 세션 식별자 | 
| status | 응답 상태: "complete""requires\_approval", 또는 "error" | 
| content | 에이전트의 응답 콘텐츠 블록 배열 | 

### 예제
<a name="mcp-sendmessage-examples"></a>

#### 기본 문자 메시지(새 세션)
<a name="mcp-example-basic-message"></a>

요청:

```
{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
        "name": "sendMessage",
        "arguments": {
            "content": [
                {
                    "type": "text",
                    "text": "List my open opportunities with expected close date in Q1 2026"
                }
            ],
            "catalog": "AWS"
        }
    }
}
```

응답:

```
{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "content": [
            {
                "type": "text",
                "text": "I found 12 open opportunities with expected close dates in Q1 2026. Here's a summary:\n\n1. **O1234567890** - Acme Corp Cloud Migration - $250,000 - Qualified stage\n2. **O1234567891** - GlobalTech Data Analytics - $180,000 - Prospect stage\n..."
            }
        ],
        "sessionId": "session-550e8400-e29b-41d4-a716-446655440000",
        "status": "complete"
    }
}
```

#### 후속 메시지(기존 세션)
<a name="mcp-example-followup"></a>

요청:

```
{
    "jsonrpc": "2.0",
    "id": 2,
    "method": "tools/call",
    "params": {
        "name": "sendMessage",
        "arguments": {
            "sessionId": "session-550e8400-e29b-41d4-a716-446655440000",
            "content": [
                {
                    "type": "text",
                    "text": "Tell me more about O1234567890. Is it ready for submission?"
                }
            ],
            "catalog": "AWS"
        }
    }
}
```

#### 파일 첨부 파일
<a name="mcp-example-file-attachment"></a>

먼저 S3에 문서를 업로드한 다음 메시지에서 참조합니다.

```
{
    "jsonrpc": "2.0",
    "id": 3,
    "method": "tools/call",
    "params": {
        "name": "sendMessage",
        "arguments": {
            "sessionId": "session-550e8400-e29b-41d4-a716-446655440000",
            "content": [
                {
                    "type": "text",
                    "text": "Review this customer proposal and suggest which opportunity it aligns with"
                },
                {
                    "type": "document",
                    "filename": "acme-proposal.pdf",
                    "s3Uri": "s3://aws-partner-central-marketplace-ephemeral-writeonly-files/123456789012/acme-proposal.pdf?versionId=abc123def456"
                }
            ],
            "catalog": "AWS"
        }
    }
}
```

파일 업로드 제약 조건:
+ 메시지당 최대 3개의 파일
+ 이미지 크기 제한: 3.75MB
+ 문서 크기 제한: 4.5MB
+ 허용되는 확장: `doc`, `docx`, `pdf`, `png`, `jpeg`, `xlsx`, `csv`, `txt` 
+ 파일을에 업로드해야 합니다. `s3://{bucket}/{your-aws-account-id}/` 
+ S3 URI에는 `versionId` 쿼리 파라미터가 포함되어야 합니다.

### Human-in-the-loop 승인 워크플로
<a name="mcp-sendmessage-approval"></a>

에이전트가 쓰기 작업을 수행해야 하는 경우(예: 기회 업데이트, 자금 지원 애플리케이션 제출) 제안된 작업 세부 정보가 포함된 `"requires_approval"` 상태를 반환합니다. `tool_approval_response` 콘텐츠 블록으로 응답해야 합니다.

**1단계 - 에이전트가 승인을 요청합니다.**

```
{
    "jsonrpc": "2.0",
    "id": 4,
    "result": {
        "content": [
            {
                "type": "text",
                "text": "I'd like to update opportunity O1234567890 with the following changes:\n- Target close date: 2026-03-31\n- Expected revenue: $300,000\n- Stage: Qualified\n\nPlease approve, reject, or override this action."
            },
            {
                "type": "tool_approval_request",
                "toolUseId": "tool-use-98765",
                "toolName": "update_opportunity_enhanced",
                "parameters": {
                    "opportunityId": "O1234567890",
                    "targetCloseDate": "2026-03-31",
                    "expectedRevenue": 300000,
                    "stage": "Qualified"
                }
            }
        ],
        "sessionId": "session-550e8400-e29b-41d4-a716-446655440000",
        "status": "requires_approval"
    }
}
```

**2단계 - 작업 승인:**

```
{
    "jsonrpc": "2.0",
    "id": 5,
    "method": "tools/call",
    "params": {
        "name": "sendMessage",
        "arguments": {
            "sessionId": "session-550e8400-e29b-41d4-a716-446655440000",
            "content": [
                {
                    "type": "tool_approval_response",
                    "toolUseId": "tool-use-98765",
                    "decision": "approve"
                }
            ],
            "catalog": "AWS"
        }
    }
}
```

**2단계(대안) - 작업 거부:**

```
{
    "jsonrpc": "2.0",
    "id": 5,
    "method": "tools/call",
    "params": {
        "name": "sendMessage",
        "arguments": {
            "sessionId": "session-550e8400-e29b-41d4-a716-446655440000",
            "content": [
                {
                    "type": "tool_approval_response",
                    "toolUseId": "tool-use-98765",
                    "decision": "reject",
                    "message": "The expected revenue should be $250,000, not $300,000"
                }
            ],
            "catalog": "AWS"
        }
    }
}
```

**2단계(대안) - 사용자 지정 응답으로 재정의:**

```
{
    "jsonrpc": "2.0",
    "id": 5,
    "method": "tools/call",
    "params": {
        "name": "sendMessage",
        "arguments": {
            "sessionId": "session-550e8400-e29b-41d4-a716-446655440000",
            "content": [
                {
                    "type": "tool_approval_response",
                    "toolUseId": "tool-use-98765",
                    "decision": "override",
                    "message": "Use expected revenue of $250,000 and keep the stage as Prospect instead"
                }
            ],
            "catalog": "AWS"
        }
    }
}
```

승인 결정 값:


| 결정 | 동작 | 
| --- | --- | 
| "approve" | 제안된 파라미터로 도구 실행 | 
| "reject" | 도구를 실행하지 마십시오. 선택 사항으로 이유를 message 설명합니다. | 
| "override" | 를 통해 사용자 지정 응답 또는 수정된 지침 제공 message | 

### SSE를 사용한 스트리밍
<a name="mcp-sendmessage-streaming"></a>

에이전트가 요청을 처리할 때 증분 응답 청크를 수신하도록 스트리밍을 활성화합니다.

요청:

```
{
    "jsonrpc": "2.0",
    "id": 6,
    "method": "tools/call",
    "params": {
        "name": "sendMessage",
        "arguments": {
            "sessionId": "session-550e8400-e29b-41d4-a716-446655440000",
            "content": [
                {
                    "type": "text",
                    "text": "Analyze my pipeline and identify opportunities at risk"
                }
            ],
            "catalog": "AWS",
            "stream": true
        }
    }
}
```

서버는 SSE 이벤트 스트림으로 응답합니다.

```
event: stream_start
data: {"sessionId": "session-550e8400-e29b-41d4-a716-446655440000"}

event: assistant-response.start
data: {}

event: server-tool-use
data: {"toolName": "analyze_pipeline", "parameters": {}}

event: server-tool-response
data: {"toolName": "analyze_pipeline", "result": {"opportunitiesAnalyzed": 47, "atRisk": 5}}

event: assistant-response.delta
data: {"text": "I analyzed your pipeline of 47 opportunities and identified "}

event: assistant-response.delta
data: {"text": "5 that are at risk of slipping:\n\n"}

event: assistant-response.delta
data: {"text": "1. **O2345678901** - Close date is past due by 15 days\n"}

event: assistant-response.completed
data: {"status": "complete"}

event: stream_end
data: {}
```

## `getSession`
<a name="mcp-tool-getsession"></a>

전체 대화 기록, 이벤트 및 메타데이터를 포함하여 대화 세션의 현재 상태를 검색합니다. 이를 사용하여 세션 상태를 검사하거나, 과거 상호 작용을 검토하거나, 대화를 재개할 수 있습니다.

### 파라미터
<a name="mcp-getsession-parameters"></a>
+ `sessionId` (필수) - 검색할 세션의 UUID입니다. 형식: `session-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`
+ `catalog` (필수) - 세션이 속한 환경입니다.

  유효값: `"AWS"`, `"Sandbox"` 

### 응답
<a name="mcp-getsession-response"></a>


| Field | 유형 | 설명 | 
| --- | --- | --- | 
| sessionId | 문자열 | 세션 식별자 | 
| createdAt | 문자열 | 세션 생성의 ISO 8601 타임스탬프 | 
| lastActivity | 문자열 | 마지막 활동의 ISO 8601 타임스탬프 | 
| sequenceNumber | 정수 | 현재 이벤트 시퀀스 번호 | 
| stateType | 문자열 | 현재 세션 상태 | 
| events | 배열 | 전체 대화 기록(사용자 메시지, 에이전트 응답, 도구 사용) | 
| variables | 객체 | 세션 변수 및 메타데이터 | 
| eventCount | 정수 | 세션의 총 이벤트 수 | 

### 예제
<a name="mcp-getsession-example"></a>

요청:

```
{
    "jsonrpc": "2.0",
    "id": 7,
    "method": "tools/call",
    "params": {
        "name": "getSession",
        "arguments": {
            "sessionId": "session-550e8400-e29b-41d4-a716-446655440000",
            "catalog": "AWS"
        }
    }
}
```

응답:

```
{
    "jsonrpc": "2.0",
    "id": 7,
    "result": {
        "content": [
            {
                "type": "text",
                "text": "{\"sessionId\":\"session-550e8400-e29b-41d4-a716-446655440000\",\"createdAt\":\"2026-01-15T10:30:00Z\",\"lastActivity\":\"2026-01-15T11:45:00Z\",\"sequenceNumber\":8,\"stateType\":\"END_TURN\",\"eventCount\":8,\"events\":[...],\"variables\":{}}"
            }
        ]
    }
}
```

## 오류 처리
<a name="mcp-tools-error-handling"></a>

모든 오류는 JSON-RPC 2.0 오류 형식을 따릅니다.

```
{
    "jsonrpc": "2.0",
    "id": 1,
    "error": {
        "code": -32001,
        "message": "Authentication failed. Verify your SigV4 credentials and ensure they have not expired."
    }
}
```

오류 코드의 전체 목록과 그 의미는 [오류 코드](mcp-configuration-reference.md#mcp-config-error-codes) 섹션을 참조하세요.

**권장 재시도 전략**
+ `-32004` (LIMIT\_EXCEEDED): 1초부터 지수 백오프를 사용하여 재시도
+ `-32603` (INTERNAL\_ERROR): 지수 백오프를 사용하여 최대 3회 재시도
+ `-32001` (AUTHENTICATION\_FAILURE): 자격 증명 새로 고침 및 재시도
+ 다른 모든 오류의 경우: 자동으로 재시도하지 않음 - 오류 메시지를 검사하고 요청을 수정합니다.