mavis_config_show
View the current configuration of the Mavis daemon, including models, provider, and nexus settings.
Instructions
Show current Mavis daemon configuration (models, provider, nexus settings).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.js:381-386 (handler)Tool definition for 'mavis_config_show'. The handler is implicit: it has no custom execFn, so runTool uses execMavisJSON (line 84) which executes mavis CLI with buildArgs = ['config', 'show'] and parses the JSON output. No schema validation beyond an empty object.
{ name: 'mavis_config_show', description: 'Show current Mavis daemon configuration (models, provider, nexus settings).', inputSchema: z.object({}), buildArgs: () => ['config', 'show'] }, - src/index.js:381-386 (schema)Input schema for mavis_config_show: z.object({}) — no arguments expected.
{ name: 'mavis_config_show', description: 'Show current Mavis daemon configuration (models, provider, nexus settings).', inputSchema: z.object({}), buildArgs: () => ['config', 'show'] }, - src/index.js:484-492 (registration)Tools are registered in MavisServer constructor via this.toolMap = new Map(tools.map(t => [t.name, t])) (line 484) and served through ListToolsRequestSchema handler (line 486).
this.toolMap = new Map(tools.map(t => [t.name, t])); this.server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: tools.map(t => ({ name: t.name, description: t.description, inputSchema: normalizeObjectSchema(t.inputSchema), })), })); - src/index.js:77-84 (handler)runTool is the generic handler runner. For mavis_config_show (no custom execFn), it calls execMavisJSON(args) which runs 'mavis config show' and parses JSON output.
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); - src/index.js:32-53 (helper)execMavis helper spawns the mavis CLI binary with arguments and captures stdout.
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(); }); }