chore(mcp): clarify trap-sandbox tool descriptions

This commit is contained in:
Guillaume ARM 2026-06-16 02:49:34 +02:00
parent f332b2ad5f
commit d35cb1b2ec
3 changed files with 12 additions and 10 deletions

View File

@ -1,12 +1,12 @@
{
"name": "trap-sandbox",
"version": "0.2.0",
"version": "0.2.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "trap-sandbox",
"version": "0.2.0",
"version": "0.2.1",
"dependencies": {
"@fastify/websocket": "^11",
"@opencode-ai/sdk": "^1.17.4",

View File

@ -1,6 +1,6 @@
{
"name": "trap-sandbox",
"version": "0.2.0",
"version": "0.2.1",
"private": true,
"type": "module",
"engines": {

View File

@ -24,22 +24,23 @@ type JsonRpcRequest = {
params?: unknown;
};
const SERVER_VERSION = "0.2.0";
const SERVER_VERSION = "0.2.1";
const TOOLS = [
{
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 },
},
{
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: {
type: "object",
properties: {
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." },
},
required: ["traposId", "code"],
@ -48,12 +49,13 @@ const TOOLS = [
},
{
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: {
type: "object",
properties: {
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." },
},
required: ["traposId", "path"],
@ -62,7 +64,7 @@ const TOOLS = [
},
{
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: {
type: "object",
properties: {