Set per-client tool access
Allows or denies one upstream tool for one client. Upserted, so repeating the call updates the existing record. PUT is accepted on this path and behaves identically.
curl -X POST "https://mythic-analytics.gulp.workers.dev/builder/mcp/tools/123e4567-e89b-12d3-a456-426614174000/access" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"location_id": "loc_abc123",
"is_allowed": true
}'
import requests
import json
url = "https://mythic-analytics.gulp.workers.dev/builder/mcp/tools/123e4567-e89b-12d3-a456-426614174000/access"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
}
data = {
"location_id": "loc_abc123",
"is_allowed": true
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://mythic-analytics.gulp.workers.dev/builder/mcp/tools/123e4567-e89b-12d3-a456-426614174000/access", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
},
body: JSON.stringify({
"location_id": "loc_abc123",
"is_allowed": true
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"location_id": "loc_abc123",
"is_allowed": true
}`)
req, err := http.NewRequest("POST", "https://mythic-analytics.gulp.workers.dev/builder/mcp/tools/123e4567-e89b-12d3-a456-426614174000/access", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://mythic-analytics.gulp.workers.dev/builder/mcp/tools/123e4567-e89b-12d3-a456-426614174000/access')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request['Authorization'] = 'Bearer YOUR_API_TOKEN'
request.body = '{
"location_id": "loc_abc123",
"is_allowed": true
}'
response = http.request(request)
puts response.body
{
"data": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"tool_id": "123e4567-e89b-12d3-a456-426614174000",
"location_id": "loc_abc123",
"is_allowed": true
}
}
{
"error": "Bad Request",
"message": "The request contains invalid parameters or malformed data",
"code": 400,
"details": [
{
"field": "email",
"message": "Invalid email format"
}
]
}
{
"error": "Forbidden",
"message": "You don't have permission to access this resource",
"code": 403
}
/builder/mcp/tools/{id}/accessTarget server for requests. Edit to use your own host.
An agency key (ak_). Location secret keys are rejected. Scoped keys (mcp_) are not accepted here (403 not_available_to_scoped_keys).
ak_). Location secret keys are rejected. Scoped keys (mcp_) are not accepted here (403 not_available_to_scoped_keys).The media type of the request body
Client the rule applies to. Falls back to the location bound to the request; one of the two must be present.
Request Preview
Response
Response will appear here after sending the request
Authentication
Bearer token. An agency key (ak_). Location secret keys are rejected. Scoped keys (mcp_) are not accepted here (403 not_available_to_scoped_keys).
Path Parameters
Body
Client the rule applies to. Falls back to the location bound to the request; one of the two must be present.
loc_abc123true