|
18 | 18 | "operationId": "health-check", |
19 | 19 | "summary": "Check health", |
20 | 20 | "description": "Checks the health status of the server.", |
| 21 | + "parameters": [ |
| 22 | + { |
| 23 | + "$ref": "#/components/parameters/OXPVersionSelectorHeader" |
| 24 | + } |
| 25 | + ], |
21 | 26 | "security": [{}], |
22 | 27 | "responses": { |
23 | 28 | "200": { |
24 | | - "description": "Server is healthy." |
| 29 | + "description": "Server is healthy.", |
| 30 | + "headers": { |
| 31 | + "OXP-Version": { |
| 32 | + "$ref": "#/components/headers/OXPServerHeader" |
| 33 | + } |
| 34 | + } |
25 | 35 | }, |
26 | 36 | "503": { |
27 | 37 | "description": "Server is unhealthy and cannot accept requests." |
|
34 | 44 | "operationId": "list-tools", |
35 | 45 | "summary": "List tools", |
36 | 46 | "description": "Returns a list of tool definitions.", |
| 47 | + "parameters": [ |
| 48 | + { |
| 49 | + "$ref": "#/components/parameters/OXPVersionSelectorHeader" |
| 50 | + } |
| 51 | + ], |
37 | 52 | "security": [ |
38 | 53 | { |
39 | 54 | "bearerAuth": [] |
40 | 55 | }, |
41 | 56 | {} |
42 | 57 | ], |
43 | | - "requestBody": { |
44 | | - "required": false, |
45 | | - "content": { |
46 | | - "application/json": { |
47 | | - "schema": { |
48 | | - "properties": { |
49 | | - "$schema": { |
50 | | - "type": "string", |
51 | | - "format": "uri" |
52 | | - } |
53 | | - } |
54 | | - } |
55 | | - } |
56 | | - } |
57 | | - }, |
58 | 58 | "responses": { |
59 | 59 | "200": { |
60 | 60 | "description": "A list of available tools.", |
| 61 | + "headers": { |
| 62 | + "OXP-Version": { |
| 63 | + "$ref": "#/components/headers/OXPServerHeader" |
| 64 | + } |
| 65 | + }, |
61 | 66 | "content": { |
62 | 67 | "application/json": { |
63 | 68 | "schema": { |
64 | 69 | "properties": { |
65 | | - "$schema": { |
66 | | - "type": "string", |
67 | | - "format": "uri" |
68 | | - }, |
69 | 70 | "items": { |
70 | 71 | "type": "array", |
71 | 72 | "items": { |
|
79 | 80 | } |
80 | 81 | }, |
81 | 82 | "401": { |
82 | | - "description": "Unauthorized. The request requires authentication, but the provided credentials are invalid or missing." |
| 83 | + "description": "Unauthorized. The request requires authentication, but the provided credentials are invalid or missing.", |
| 84 | + "headers": { |
| 85 | + "OXP-Version": { |
| 86 | + "$ref": "#/components/headers/OXPServerHeader" |
| 87 | + } |
| 88 | + } |
83 | 89 | } |
84 | 90 | } |
85 | 91 | } |
|
89 | 95 | "operationId": "call-tool", |
90 | 96 | "summary": "Call tool", |
91 | 97 | "description": "Calls a tool with the given parameters.", |
| 98 | + "parameters": [ |
| 99 | + { |
| 100 | + "$ref": "#/components/parameters/OXPVersionSelectorHeader" |
| 101 | + } |
| 102 | + ], |
92 | 103 | "security": [ |
93 | 104 | { |
94 | 105 | "bearerAuth": [] |
|
100 | 111 | "content": { |
101 | 112 | "application/json": { |
102 | 113 | "schema": { |
103 | | - "properties": { |
104 | | - "$schema": { |
105 | | - "type": "string", |
106 | | - "format": "uri" |
107 | | - }, |
108 | | - "request": { |
109 | | - "$ref": "#/components/schemas/CallToolRequest" |
110 | | - } |
111 | | - }, |
112 | | - "required": ["request"] |
| 114 | + "$ref": "#/components/schemas/CallToolRequest" |
113 | 115 | } |
114 | 116 | } |
115 | 117 | } |
116 | 118 | }, |
117 | 119 | "responses": { |
118 | 120 | "200": { |
119 | 121 | "description": "Response from tool.", |
| 122 | + "headers": { |
| 123 | + "OXP-Version": { |
| 124 | + "$ref": "#/components/headers/OXPServerHeader" |
| 125 | + } |
| 126 | + }, |
120 | 127 | "content": { |
121 | 128 | "application/json": { |
122 | 129 | "schema": { |
123 | | - "properties": { |
124 | | - "$schema": { |
125 | | - "type": "string", |
126 | | - "format": "uri" |
127 | | - }, |
128 | | - "result": { |
129 | | - "$ref": "#/components/schemas/CallToolResponse" |
130 | | - } |
131 | | - }, |
132 | | - "required": ["result"] |
| 130 | + "$ref": "#/components/schemas/CallToolResponse" |
133 | 131 | } |
134 | 132 | } |
135 | 133 | } |
136 | 134 | }, |
137 | 135 | "400": { |
138 | 136 | "description": "The request is invalid or could not be processed.", |
| 137 | + "headers": { |
| 138 | + "OXP-Version": { |
| 139 | + "$ref": "#/components/headers/OXPServerHeader" |
| 140 | + } |
| 141 | + }, |
139 | 142 | "content": { |
140 | 143 | "application/json": { |
141 | 144 | "schema": { |
|
144 | 147 | } |
145 | 148 | } |
146 | 149 | }, |
147 | | - "401": { |
148 | | - "description": "Unauthorized. The request requires authentication, but the provided credentials are invalid or missing." |
149 | | - }, |
150 | 150 | "422": { |
151 | 151 | "description": "The tool call is valid, but the parameters are invalid (missing, incorrect type, etc).", |
| 152 | + "headers": { |
| 153 | + "OXP-Version": { |
| 154 | + "$ref": "#/components/headers/OXPServerHeader" |
| 155 | + } |
| 156 | + }, |
152 | 157 | "content": { |
153 | 158 | "application/json": { |
154 | 159 | "schema": { |
|
169 | 174 | "bearerFormat": "JWT" |
170 | 175 | } |
171 | 176 | }, |
| 177 | + "parameters": { |
| 178 | + "OXPVersionSelectorHeader": { |
| 179 | + "name": "OXP-Version", |
| 180 | + "in": "header", |
| 181 | + "description": "Optional header to specify the version of the OXP protocol to use.", |
| 182 | + "required": false, |
| 183 | + "schema": { |
| 184 | + "type": "string" |
| 185 | + } |
| 186 | + } |
| 187 | + }, |
| 188 | + "headers": { |
| 189 | + "OXPServerHeader": { |
| 190 | + "description": "The OXP version used by the server", |
| 191 | + "schema": { |
| 192 | + "type": "string" |
| 193 | + } |
| 194 | + } |
| 195 | + }, |
172 | 196 | "schemas": { |
173 | 197 | "ToolId": { |
174 | 198 | "type": "string", |
|
0 commit comments