mavis_session_diff
Display the git diff of file changes from a session to review modifications.
Instructions
Show file changes (git diff) made by a session.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sessionId | Yes | Session ID |
Implementation Reference
- src/index.js:179-188 (handler)The tool definition for 'mavis_session_diff'. The handler logic is in execFn: execMavis, which spawns the mavis CLI binary with args ['session', 'diff', sessionId]. The outputMode is OUTPUT_RAW, meaning the raw string output is returned directly.
{ name: 'mavis_session_diff', description: 'Show file changes (git diff) made by a session.', inputSchema: z.object({ sessionId: z.string().describe('Session ID') }), execFn: execMavis, outputMode: OUTPUT_RAW, buildArgs: ({ sessionId }) => ['session', 'diff', sessionId] }, - src/index.js:179-188 (schema)Input schema for mavis_session_diff: requires a single 'sessionId' string parameter.
{ name: 'mavis_session_diff', description: 'Show file changes (git diff) made by a session.', inputSchema: z.object({ sessionId: z.string().describe('Session ID') }), execFn: execMavis, outputMode: OUTPUT_RAW, buildArgs: ({ sessionId }) => ['session', 'diff', sessionId] }, - src/index.js:179-188 (registration)The tool is registered as part of the 'tools' array in the export at line 527, and registered with the MCP server via MavisServer constructor (line 484: this.toolMap = new Map(tools.map(t => [t.name, t]))). The tool is also listed via ListToolsRequestSchema handler (line 486-492).
{ name: 'mavis_session_diff', description: 'Show file changes (git diff) made by a session.', inputSchema: z.object({ sessionId: z.string().describe('Session ID') }), execFn: execMavis, outputMode: OUTPUT_RAW, buildArgs: ({ sessionId }) => ['session', 'diff', sessionId] }, - src/index.js:32-32 (helper)execMavis helper function that spawns the mavis CLI binary and executes the command. It passes through args (e.g. ['session', 'diff', sessionId]), adds a --session flag if the subcommand is a session/communication command, and returns stdout on success.
function execMavis(args, input = '') { - src/index.js:74-74 (helper)OUTPUT_RAW constant and runTool function (lines 77-92) that dispatches execution. For mavis_session_diff, since execFn is set and outputMode is OUTPUT_RAW, it calls execMavis with the args and returns the raw string as text content.
const OUTPUT_TEXT = 'text'; // JSON.stringify(result, null, 2)