mavis_skill_list
Retrieve a list of all installed Mavis skills, including global and agent-specific ones, to understand what capabilities are available.
Instructions
List all installed Mavis skills (global and agent-specific).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.js:348-353 (registration)Tool registration for mavis_skill_list: part of the tools array, defines name, description, empty input schema (no params), and buildArgs that constructs CLI args ['skill', 'list'] to the Mavis binary. No custom execFn so runTool uses execMavisJSON by default.
{ name: 'mavis_skill_list', description: 'List all installed Mavis skills (global and agent-specific).', inputSchema: z.object({}), buildArgs: () => ['skill', 'list'] }, - src/index.js:77-92 (handler)Generic tool handler (runTool) used by mavis_skill_list. Since mavis_skill_list has no execFn, it takes the execMavisJSON branch: executes 'mavis skill list', parses JSON output, and stringifies the result as text.
function runTool(spec, parsedArgs) { const { execFn, outputMode, stdin, buildArgs } = spec; const args = buildArgs(parsedArgs); const input = typeof stdin === 'function' ? stdin(parsedArgs) : stdin; const execPromise = execFn ? execMavis(args, input || '') : execMavisJSON(args); return execPromise.then(result => { const text = outputMode === OUTPUT_RAW ? (result || '') : JSON.stringify(result, null, 2); return [{ type: 'text', text }]; }); } - src/index.js:32-53 (helper)execMavis helper: spawns the MAVIS_BIN ('/Users/cunning/.mavis/bin/mavis') with args. For mavis_skill_list, subcmd='skill' which is not in SESSION_COMMANDS, so no session flag is injected.
function execMavis(args, input = '') { return new Promise((resolve, reject) => { const SESSION_COMMANDS = new Set(['communication', 'session', 'spawn']); const sessionId = process.env.__MAVIS_PARENT_SESSION_ID; const subcmd = args[0]; const needsSession = SESSION_COMMANDS.has(subcmd) && sessionId; const finalArgs = needsSession ? [...args, '--session', sessionId] : args; const proc = spawn(MAVIS_BIN, finalArgs, { stdio: ['pipe', 'pipe', 'pipe'] }); let stdout = ''; let stderr = ''; proc.stdout.on('data', d => stdout += d.toString()); proc.stderr.on('data', d => stderr += d.toString()); proc.on('close', code => { if (code === 0) resolve(stdout.trim()); else reject(new Error(stderr.split('\n')[0] || `exit code ${code}`)); }); proc.on('error', reject); if (input) proc.stdin.write(input), proc.stdin.end(); }); } - src/index.js:55-64 (helper)execMavisJSON helper: wraps execMavis to parse the CLI output as JSON, used by mavis_skill_list since it has no execFn.
function execMavisJSON(args) { return execMavis(args).then(raw => { try { return JSON.parse(raw); } catch { const jsonStart = raw.indexOf('{'); return JSON.parse(jsonStart >= 0 ? raw.slice(jsonStart) : raw); } }); } - src/index.js:351-351 (schema)Input schema for mavis_skill_list: empty object (z.object({})), meaning no parameters are accepted.
inputSchema: z.object({}),