# Resolve a prompt template at a remote MCP endpoint

POST

/v1/mcp/endpoints/{endpointId}/prompts/{name}

```sh
curl --request POST \
  --url https://example.com/v1/mcp/endpoints/example/prompts/example \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{ "arguments": { "additionalProperty": "example" } }'
```

Body carries `{ arguments?: Record<string, string> }`. Returns the ordered message list the endpoint produced.

## Authorizations

- **[bearerAuth](https://docs.kindgi.com/v0.1.10/reference/api.md#bearerauth)**

## Parameters

### Path Parameters

**endpointId**

required

string

\>= 1 characters

MCPEndpointId — deployment-stable string identifier chosen by the caller.

**name**

required

string

\>= 1 characters

Name of the prompt template at the remote endpoint.

## Request Body

application/json

object

**arguments**

Argument bag for the prompt template. Every value must be a string per MCP spec.

object

**_key_**

additional properties

string

##### Examplegenerated

```json
{
  "arguments": {
    "additionalProperty": "example"
  }
}
```

## Responses

### 200

Rendered prompt messages.

application/json

object

**messages**

required

Array\<object>

object

**role**

required

string

Allowed values: user assistant

**content**

required

One of:

- **object**

  object

  **type**

  required

  string

  Allowed value: text

  **text**

  required

  string

- **object**

  object

  **type**

  required

  string

  Allowed value: image

  **data**

  required

  Base64-encoded image bytes.

  string

  **mimeType**

  required

  string

##### Example

```json
{
  "messages": [
    {
      "role": "user",
      "content": {
        "type": "text"
      }
    }
  ]
}
```

### 400

Malformed body.

application/json

object

**error**

required

object

**code**

required

Stable machine-readable discriminant. Values match domain error codes (see `docs/API-ROUTE-CONVENTIONS.md` §4.3).

string

**message**

required

string

**details**

Optional, kind-specific.

object

**_key_**

additional properties

any

**requestId**

required

Server-assigned request id; also echoed via `X-Request-Id` header.

string

##### Examplegenerated

```json
{
  "error": {
    "code": "example",
    "message": "example",
    "details": {},
    "requestId": "example"
  }
}
```

### 401

Missing / malformed / expired / revoked bearer token.

application/json

object

**error**

required

object

**code**

required

Stable machine-readable discriminant. Values match domain error codes (see `docs/API-ROUTE-CONVENTIONS.md` §4.3).

string

**message**

required

string

**details**

Optional, kind-specific.

object

**_key_**

additional properties

any

**requestId**

required

Server-assigned request id; also echoed via `X-Request-Id` header.

string

##### Examplegenerated

```json
{
  "error": {
    "code": "example",
    "message": "example",
    "details": {},
    "requestId": "example"
  }
}
```

### 404

No MCP endpoint or prompt with that name.

application/json

object

**error**

required

object

**code**

required

Stable machine-readable discriminant. Values match domain error codes (see `docs/API-ROUTE-CONVENTIONS.md` §4.3).

string

**message**

required

string

**details**

Optional, kind-specific.

object

**_key_**

additional properties

any

**requestId**

required

Server-assigned request id; also echoed via `X-Request-Id` header.

string

##### Examplegenerated

```json
{
  "error": {
    "code": "example",
    "message": "example",
    "details": {},
    "requestId": "example"
  }
}
```

### 413

The request body is over the API’s limit (`request-too-large`; `details.maxBytes` says how much).

application/json

object

**error**

required

object

**code**

required

Stable machine-readable discriminant. Values match domain error codes (see `docs/API-ROUTE-CONVENTIONS.md` §4.3).

string

**message**

required

string

**details**

Optional, kind-specific.

object

**_key_**

additional properties

any

**requestId**

required

Server-assigned request id; also echoed via `X-Request-Id` header.

string

##### Examplegenerated

```json
{
  "error": {
    "code": "example",
    "message": "example",
    "details": {},
    "requestId": "example"
  }
}
```

### 502

Remote MCP endpoint failed to serve prompts/get.

application/json

object

**error**

required

object

**code**

required

Stable machine-readable discriminant. Values match domain error codes (see `docs/API-ROUTE-CONVENTIONS.md` §4.3).

string

**message**

required

string

**details**

Optional, kind-specific.

object

**_key_**

additional properties

any

**requestId**

required

Server-assigned request id; also echoed via `X-Request-Id` header.

string

##### Examplegenerated

```json
{
  "error": {
    "code": "example",
    "message": "example",
    "details": {},
    "requestId": "example"
  }
}
```

## See also

- [`GET /v1/mcp/endpoints`: List MCP endpoints](https://docs.kindgi.com/v0.1.10/reference/api/operations/mcpendpointslist.md)
- [`POST /v1/mcp/endpoints`: Register an MCP endpoint](https://docs.kindgi.com/v0.1.10/reference/api/operations/mcpendpointsregister.md)
- [`GET /v1/mcp/endpoints/{endpointId}`: Fetch an MCP endpoint](https://docs.kindgi.com/v0.1.10/reference/api/operations/mcpendpointsget.md)
- [`POST /v1/mcp/endpoints/{endpointId}/unregister`: Unregister an MCP endpoint](https://docs.kindgi.com/v0.1.10/reference/api/operations/mcpendpointsunregister.md)
- [Error code `request-too-large`](https://docs.kindgi.com/v0.1.10/reference/errors.md#request-too-large)
- [Every error code](https://docs.kindgi.com/v0.1.10/reference/errors.md)
