Skip to main content
Glama

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

TableJSON Schema
NameRequiredDescriptionDefault
sessionIdYesSession ID

Implementation Reference

  • 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]
    },
  • 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]
    },
  • 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 = '') {
  • 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)
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full burden for behavioral disclosure. It states 'Show file changes (git diff)', implying read-only, but does not mention any side effects, authentication needs, or output format. For a diff tool, the behavioral context is scant.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence of 9 words with no redundancy. It is maximally concise and front-loaded with the core purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the simplicity (one parameter, no output schema), the description is minimally adequate. It tells what the tool does but lacks context on the output (e.g., file list or diff content) and any constraints on the session. A slightly more complete description would improve usability.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has one parameter (sessionId) with 100% description coverage. The tool description does not add any additional meaning beyond what the schema already provides for that parameter. Baseline 3 is appropriate as the schema handles the param documentation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Show file changes (git diff) made by a session.' It uses a specific verb ('Show') and resource ('file changes (git diff)'), which distinguishes it from sibling session tools like mavis_session_info and mavis_session_list.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is given on when to use this tool versus alternatives, or any prerequisites (e.g., session must have changes). The usage is implied but not explicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Cunning-Kang/mavis-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server