Tool: get_spec_contents
Get spec contents.
The following sample demonstrate how to use curl
to invoke the get_spec_contents
MCP tool.
| Curl Request |
|---|
curl --location 'https://apihub. REGION .rep.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 } ' |
Where, REGION
is the supported API hub region. For more information, see Supported regions
.
Input Schema
The GetSpecContents
method's request.
GetSpecContentsRequest
| JSON representation |
|---|
{ "name" : string } |
| Fields | |
|---|---|
name
|
Required. The name of the spec whose contents need to be retrieved. Format: |
Output Schema
The spec contents.
SpecContents
| JSON representation |
|---|
{ "contents" : string , "mimeType" : string } |
| Fields | |
|---|---|
contents
|
Required. The contents of the spec. A base64-encoded string. |
mimeType
|
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: ❌

