chore(mcp): clarify trap-sandbox tool descriptions
This commit is contained in:
parent
f332b2ad5f
commit
d35cb1b2ec
4
tools/trap-sandbox/package-lock.json
generated
4
tools/trap-sandbox/package-lock.json
generated
@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "trap-sandbox",
|
"name": "trap-sandbox",
|
||||||
"version": "0.2.0",
|
"version": "0.2.1",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "trap-sandbox",
|
"name": "trap-sandbox",
|
||||||
"version": "0.2.0",
|
"version": "0.2.1",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fastify/websocket": "^11",
|
"@fastify/websocket": "^11",
|
||||||
"@opencode-ai/sdk": "^1.17.4",
|
"@opencode-ai/sdk": "^1.17.4",
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "trap-sandbox",
|
"name": "trap-sandbox",
|
||||||
"version": "0.2.0",
|
"version": "0.2.1",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|||||||
@ -24,22 +24,23 @@ type JsonRpcRequest = {
|
|||||||
params?: unknown;
|
params?: unknown;
|
||||||
};
|
};
|
||||||
|
|
||||||
const SERVER_VERSION = "0.2.0";
|
const SERVER_VERSION = "0.2.1";
|
||||||
|
|
||||||
const TOOLS = [
|
const TOOLS = [
|
||||||
{
|
{
|
||||||
name: "probe-computers",
|
name: "probe-computers",
|
||||||
description: "Probe all connected TrapOS computers; lists each computer's traposId.",
|
description: "List connected TrapOS computers and ping each one. Use the returned traposId with the other tools.",
|
||||||
inputSchema: { type: "object", properties: {}, additionalProperties: false },
|
inputSchema: { type: "object", properties: {}, additionalProperties: false },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "exec-lua",
|
name: "exec-lua",
|
||||||
description: "Execute Lua code on a connected TrapOS computer.",
|
description:
|
||||||
|
"Execute an inline Lua snippet on a connected TrapOS computer. Use for short probes; use run-file for existing programs.",
|
||||||
inputSchema: {
|
inputSchema: {
|
||||||
type: "object",
|
type: "object",
|
||||||
properties: {
|
properties: {
|
||||||
traposId: { type: "string", description: 'Target traposId ("<id>:<label>", from probe-computers).' },
|
traposId: { type: "string", description: 'Target traposId ("<id>:<label>", from probe-computers).' },
|
||||||
code: { type: "string", description: "Lua source code to execute." },
|
code: { type: "string", description: "Inline Lua source code to execute." },
|
||||||
timeoutMs: { type: "number", description: "Optional host-side timeout in milliseconds, max 30000." },
|
timeoutMs: { type: "number", description: "Optional host-side timeout in milliseconds, max 30000." },
|
||||||
},
|
},
|
||||||
required: ["traposId", "code"],
|
required: ["traposId", "code"],
|
||||||
@ -48,12 +49,13 @@ const TOOLS = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "run-file",
|
name: "run-file",
|
||||||
description: "Run a Lua file on a connected TrapOS computer and capture its output.",
|
description:
|
||||||
|
"Run an existing Lua file or program on a connected TrapOS computer and capture its output. Prefer this for commands such as /programs/ccpm.lua.",
|
||||||
inputSchema: {
|
inputSchema: {
|
||||||
type: "object",
|
type: "object",
|
||||||
properties: {
|
properties: {
|
||||||
traposId: { type: "string", description: 'Target traposId ("<id>:<label>", from probe-computers).' },
|
traposId: { type: "string", description: 'Target traposId ("<id>:<label>", from probe-computers).' },
|
||||||
path: { type: "string", description: "Lua file path on the TrapOS computer to run." },
|
path: { type: "string", description: "Absolute Lua file path on the TrapOS computer to run, for example /programs/ccpm.lua." },
|
||||||
timeoutMs: { type: "number", description: "Optional host-side timeout in milliseconds, max 30000." },
|
timeoutMs: { type: "number", description: "Optional host-side timeout in milliseconds, max 30000." },
|
||||||
},
|
},
|
||||||
required: ["traposId", "path"],
|
required: ["traposId", "path"],
|
||||||
@ -62,7 +64,7 @@ const TOOLS = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "write-file",
|
name: "write-file",
|
||||||
description: "Write file content on a connected TrapOS computer, overwriting any existing file.",
|
description: "Create or overwrite a file on a connected TrapOS computer with the supplied content.",
|
||||||
inputSchema: {
|
inputSchema: {
|
||||||
type: "object",
|
type: "object",
|
||||||
properties: {
|
properties: {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user