|
|
@@ -4541,9 +4541,9 @@
|
|
|
]
|
|
|
}
|
|
|
},
|
|
|
- "/mcp/resources": {
|
|
|
+ "/experimental/resource": {
|
|
|
"get": {
|
|
|
- "operationId": "mcp.resources",
|
|
|
+ "operationId": "experimental.resource.list",
|
|
|
"parameters": [
|
|
|
{
|
|
|
"in": "query",
|
|
|
@@ -4554,7 +4554,7 @@
|
|
|
}
|
|
|
],
|
|
|
"summary": "Get MCP resources",
|
|
|
- "description": "Get all available MCP resources from connected servers.",
|
|
|
+ "description": "Get all available MCP resources from connected servers. Optionally filter by name.",
|
|
|
"responses": {
|
|
|
"200": {
|
|
|
"description": "MCP resources",
|
|
|
@@ -4565,7 +4565,9 @@
|
|
|
"propertyNames": {
|
|
|
"type": "string"
|
|
|
},
|
|
|
- "additionalProperties": {}
|
|
|
+ "additionalProperties": {
|
|
|
+ "$ref": "#/components/schemas/McpResource"
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -4574,7 +4576,7 @@
|
|
|
"x-codeSamples": [
|
|
|
{
|
|
|
"lang": "js",
|
|
|
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.resources({\n ...\n})"
|
|
|
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.resource.list({\n ...\n})"
|
|
|
}
|
|
|
]
|
|
|
}
|
|
|
@@ -6078,6 +6080,25 @@
|
|
|
},
|
|
|
"required": ["text", "type", "path", "range", "name", "kind"]
|
|
|
},
|
|
|
+ "ResourceSource": {
|
|
|
+ "type": "object",
|
|
|
+ "properties": {
|
|
|
+ "text": {
|
|
|
+ "$ref": "#/components/schemas/FilePartSourceText"
|
|
|
+ },
|
|
|
+ "type": {
|
|
|
+ "type": "string",
|
|
|
+ "const": "resource"
|
|
|
+ },
|
|
|
+ "clientName": {
|
|
|
+ "type": "string"
|
|
|
+ },
|
|
|
+ "uri": {
|
|
|
+ "type": "string"
|
|
|
+ }
|
|
|
+ },
|
|
|
+ "required": ["text", "type", "clientName", "uri"]
|
|
|
+ },
|
|
|
"FilePartSource": {
|
|
|
"anyOf": [
|
|
|
{
|
|
|
@@ -6085,6 +6106,9 @@
|
|
|
},
|
|
|
{
|
|
|
"$ref": "#/components/schemas/SymbolSource"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "$ref": "#/components/schemas/ResourceSource"
|
|
|
}
|
|
|
]
|
|
|
},
|
|
|
@@ -9880,7 +9904,7 @@
|
|
|
"maximum": 9007199254740991
|
|
|
}
|
|
|
},
|
|
|
- "required": ["name", "mode", "builtIn", "permission", "options"]
|
|
|
+ "required": ["name", "mode", "permission", "options"]
|
|
|
},
|
|
|
"MCPStatusConnected": {
|
|
|
"type": "object",
|
|
|
@@ -9957,6 +9981,27 @@
|
|
|
}
|
|
|
]
|
|
|
},
|
|
|
+ "McpResource": {
|
|
|
+ "type": "object",
|
|
|
+ "properties": {
|
|
|
+ "name": {
|
|
|
+ "type": "string"
|
|
|
+ },
|
|
|
+ "uri": {
|
|
|
+ "type": "string"
|
|
|
+ },
|
|
|
+ "description": {
|
|
|
+ "type": "string"
|
|
|
+ },
|
|
|
+ "mimeType": {
|
|
|
+ "type": "string"
|
|
|
+ },
|
|
|
+ "client": {
|
|
|
+ "type": "string"
|
|
|
+ }
|
|
|
+ },
|
|
|
+ "required": ["name", "uri", "client"]
|
|
|
+ },
|
|
|
"LSPStatus": {
|
|
|
"type": "object",
|
|
|
"properties": {
|