request
Send HTTP calls to a local development server. Specify port, path, method, optional body, and headers to interact with localhost APIs.
Instructions
Sends an HTTP request to localhost at given port, with given HTTP method, request body, and headers.
Parameters
port : int Port to send request to (e.g. port=8000 hits http://localhost:8000).
path : str Path to send request to (e.g. path=/foo/bar hits http://localhost:{port}/foo/bar).
method : str, HTTP method for request (e.g. GET, POST).
data : str, optional HTTP request body. Note: content type header is not set automatically, and must be set through "headers".
headers : dict, optional HTTP headers (e.g. {"Content-Type": "application/json"}).
Returns
int Response status code.
str Response data.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"port": "<port>",
"path": "<path>",
"method": "<method>"
},
"name": "request"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| port | Yes | ||
| path | Yes | ||
| method | Yes | ||
| data | No | ||
| headers | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |