## Tool: `get_spec_contents`

Get contents of a spec resource in the API hub.

The following sample demonstrate how to use `curl` to invoke the `get_spec_contents` MCP tool.

| Curl Request |
|---|
| ```bash curl --location 'https://apihub.googleapis.com/mcp' \ --header 'content-type: application/json' \ --header 'accept: application/json, text/event-stream' \ --data '{ "method": "tools/call", "params": { "name": "get_spec_contents", "arguments": { // provide these details according to the tool's MCP specification } }, "jsonrpc": "2.0", "id": 1 }' ``` |

## Input Schema

The `GetSpecContents` method's request.

### GetSpecContentsRequest

| JSON representation |
|---|
| ``` { "name": string } ``` |

| Fields ||
|---|---|
| `name` | `string` Required. The name of the spec whose contents need to be retrieved. Format: `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}` |

## Output Schema

The spec contents.

### SpecContents

| JSON representation |
|---|
| ``` { "contents": string, "mimeType": string } ``` |

| Fields ||
|---|---|
| `contents` | `string (https://developers.google.com/discovery/v1/type-format format)` Required. The contents of the spec. A base64-encoded string. |
| `mimeType` | `string` Required. The mime type of the content for example application/json, application/yaml, application/wsdl etc. |

### Tool Annotations

Destructive Hint: ❌ \| Idempotent Hint: ✅ \| Read Only Hint: ✅ \| Open World Hint: ❌