Scripts
Author, search, and run reusable TypeScript scripts — a shared automation catalog callable across swarm agents and workflows
Authorization
bearerAuth API key via Authorization: Bearer <API_KEY>
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X POST "http://localhost:3013/api/mcp-bridge" \ -H "Content-Type: application/json" \ -d '{ "tool": "string" }'{
"error": "string",
"property1": null,
"property2": null
}{
"error": "string",
"property1": null,
"property2": null
}{
"error": "string",
"property1": null,
"property2": null
}Authorization
bearerAuth API key via Authorization: Bearer <API_KEY>
In: header
Query Parameters
"global" | "agent""true" | "false"Response Body
application/json
application/json
curl -X GET "http://localhost:3013/api/scripts"{
"scripts": [
{
"id": "string",
"name": "string",
"scope": "global",
"scopeId": "string",
"description": "string",
"intent": "string",
"version": 0,
"isScratch": true,
"typeChecked": true,
"fsMode": "none",
"createdByAgentId": "string",
"createdAt": "string",
"updatedAt": "string"
}
]
}{
"error": "string",
"property1": null,
"property2": null
}Authorization
bearerAuth API key via Authorization: Bearer <API_KEY>
In: header
Path Parameters
uuidResponse Body
application/json
application/json
curl -X GET "http://localhost:3013/api/scripts/497f6eca-6276-4993-bfeb-53cbbbba6f08"{
"script": {
"id": "string",
"name": "string",
"scope": "global",
"scopeId": "string",
"source": "string",
"description": "string",
"intent": "string",
"signatureJson": "string",
"contentHash": "string",
"version": 0,
"isScratch": true,
"typeChecked": true,
"fsMode": "none",
"createdByAgentId": "string",
"createdAt": "string",
"updatedAt": "string",
"signature": {
"argsType": "string",
"resultType": "string",
"description": "string"
},
"argsJsonSchema": {
"property1": null,
"property2": null
},
"created_by": "string",
"updated_by": "string"
}
}{
"error": "string",
"property1": null,
"property2": null
}Authorization
bearerAuth API key via Authorization: Bearer <API_KEY>
In: header
Path Parameters
uuidResponse Body
application/json
application/json
curl -X GET "http://localhost:3013/api/scripts/497f6eca-6276-4993-bfeb-53cbbbba6f08/apis"{
"apis": [
{
"id": "string",
"scriptId": "string",
"agentId": "string",
"authMode": "none",
"enabled": true,
"label": "string",
"callCount": 0,
"lastUsedAt": "string",
"createdAt": "string"
}
]
}{
"error": "string",
"property1": null,
"property2": null
}Authorization
bearerAuth API key via Authorization: Bearer <API_KEY>
In: header
Path Parameters
uuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X POST "http://localhost:3013/api/scripts/497f6eca-6276-4993-bfeb-53cbbbba6f08/apis" \ -H "Content-Type: application/json" \ -d '{}'{
"id": "string",
"scriptId": "string",
"agentId": "string",
"authMode": "none",
"enabled": true,
"label": "string",
"callCount": 0,
"lastUsedAt": "string",
"createdAt": "string",
"token": "string"
}{
"error": "string",
"property1": null,
"property2": null
}{
"error": "string",
"property1": null,
"property2": null
}Authorization
bearerAuth API key via Authorization: Bearer <API_KEY>
In: header
Path Parameters
uuidResponse Body
application/json
application/json
curl -X DELETE "http://localhost:3013/api/scripts/497f6eca-6276-4993-bfeb-53cbbbba6f08/apis/string"{
"deleted": true
}{
"error": "string",
"property1": null,
"property2": null
}Authorization
bearerAuth API key via Authorization: Bearer <API_KEY>
In: header
Path Parameters
uuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X PATCH "http://localhost:3013/api/scripts/497f6eca-6276-4993-bfeb-53cbbbba6f08/apis/string" \ -H "Content-Type: application/json" \ -d '{}'{
"id": "string",
"scriptId": "string",
"agentId": "string",
"authMode": "none",
"enabled": true,
"label": "string",
"callCount": 0,
"lastUsedAt": "string",
"createdAt": "string"
}{
"error": "string",
"property1": null,
"property2": null
}Authorization
bearerAuth API key via Authorization: Bearer <API_KEY>
In: header
Path Parameters
uuidResponse Body
application/json
application/json
application/json
curl -X POST "http://localhost:3013/api/scripts/497f6eca-6276-4993-bfeb-53cbbbba6f08/apis/string/rotate"{
"id": "string",
"scriptId": "string",
"agentId": "string",
"authMode": "none",
"enabled": true,
"label": "string",
"callCount": 0,
"lastUsedAt": "string",
"createdAt": "string",
"token": "string"
}{
"error": "string",
"property1": null,
"property2": null
}{
"error": "string",
"property1": null,
"property2": null
}Authorization
bearerAuth API key via Authorization: Bearer <API_KEY>
In: header
Path Parameters
uuidResponse Body
application/json
application/json
curl -X GET "http://localhost:3013/api/scripts/497f6eca-6276-4993-bfeb-53cbbbba6f08/apis/string/secret"{
"token": "string"
}{
"error": "string",
"property1": null,
"property2": null
}Authorization
bearerAuth API key via Authorization: Bearer <API_KEY>
In: header
Path Parameters
uuidResponse Body
application/json
application/json
curl -X GET "http://localhost:3013/api/scripts/497f6eca-6276-4993-bfeb-53cbbbba6f08/versions"{
"versions": [
{
"id": "string",
"scriptId": "string",
"version": 0,
"source": "string",
"description": "string",
"intent": "string",
"signatureJson": "string",
"contentHash": "string",
"changedByAgentId": "string",
"changedAt": "string",
"changeReason": "string",
"created_by": "string",
"updated_by": "string"
}
]
}{
"error": "string",
"property1": null,
"property2": null
}Authorization
bearerAuth API key via Authorization: Bearer <API_KEY>
In: header
Path Parameters
1 <= length <= 200Query Parameters
"agent""global" | "agent"Response Body
application/json
application/json
application/json
application/json
curl -X DELETE "http://localhost:3013/api/scripts/string"{
"deleted": true
}{
"error": "string",
"property1": null,
"property2": null
}{
"error": "string",
"property1": null,
"property2": null
}{
"error": "string",
"property1": null,
"property2": null
}Authorization
bearerAuth API key via Authorization: Bearer <API_KEY>
In: header
Path Parameters
1 <= length <= 200Query Parameters
"global" | "agent"Response Body
application/json
application/json
curl -X GET "http://localhost:3013/api/scripts/string/types"{
"signature": {
"argsType": "string",
"resultType": "string",
"description": "string"
},
"argsJsonSchema": {
"property1": null,
"property2": null
},
"sdkTypes": "string",
"stdlibTypes": "string"
}{
"error": "string",
"property1": null,
"property2": null
}Authorization
bearerAuth API key via Authorization: Bearer <API_KEY>
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "http://localhost:3013/api/scripts/run" \ -H "Content-Type: application/json" \ -d '{}'{
"result": null,
"autoSaved": {
"slug": "string",
"reason": "string"
},
"kvSaved": {
"namespace": "string",
"key": "string"
},
"truncated": {
"stdout": true,
"stderr": true
},
"durationMs": 0,
"stdout": "string",
"stderr": "string",
"exitCode": 0,
"error": "timeout",
"runtimeError": {
"name": "string",
"message": "string",
"stack": "string",
"userFrames": [
{
"file": "string",
"line": 0,
"column": 0,
"raw": "string"
}
],
"userScriptLine": 0,
"userScriptColumn": 0
}
}{
"error": "string",
"property1": null,
"property2": null
}{
"error": "string",
"property1": null,
"property2": null
}{
"error": "string",
"property1": null,
"property2": null
}Authorization
bearerAuth API key via Authorization: Bearer <API_KEY>
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "http://localhost:3013/api/scripts/search" \ -H "Content-Type: application/json" \ -d '{}'{
"results": [
{
"name": "string",
"signature": {
"argsType": "string",
"resultType": "string",
"description": "string"
},
"argsJsonSchema": {
"property1": null,
"property2": null
},
"description": "string",
"score": 0
}
]
}{
"error": "string",
"property1": null,
"property2": null
}Authorization
bearerAuth API key via Authorization: Bearer <API_KEY>
In: header
Response Body
application/json
curl -X GET "http://localhost:3013/api/scripts/type-defs"{
"sdkTypes": "string",
"stdlibTypes": "string"
}Authorization
bearerAuth API key via Authorization: Bearer <API_KEY>
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X POST "http://localhost:3013/api/scripts/upsert" \ -H "Content-Type: application/json" \ -d '{ "name": "string", "source": "string" }'{
"name": "string",
"version": 0,
"contentDeduped": true
}{
"error": "string",
"property1": null,
"property2": null
}{
"error": "string",
"property1": null,
"property2": null
}