Skip to main content
Glama

Remember Fix Result

remember_fix_result

Record a fix result after attempting a fix and running a verification command, storing the pass/fail outcome with analysis details.

Instructions

Record verified project-local fix memory only after a fix/change was actually attempted, the verification command was actually run, and the result is clearly passed or failed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
analysis_idYes
fingerprintYes
stackYes
fix_attemptedYes
verification_commandYes
verification_resultYes
notesNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
recordedYes
memory_pathYes
timestampYes

Implementation Reference

  • The main handler function for 'remember_fix_result'. Parses input with zod schema, redacts secrets, creates a FixMemoryRecord, resolves the project path (from in-memory store, registry, or cwd), appends the record to the memory file, and returns the output.
    export async function rememberFixResult(input: RememberFixResultInput): Promise<RememberFixResultOutput> {
      const parsed = rememberFixResultInputSchema.parse(input);
      const redactedInput = redactUnknown(parsed);
      const timestamp = new Date().toISOString();
      const record = fixMemoryRecordSchema.parse({
        timestamp,
        ...redactedInput,
        worked: redactedInput.verification_result === "passed"
      });
      const projectPath = await resolveMemoryProjectPath(redactedInput.analysis_id);
      const memoryPath = await appendMemory(projectPath, record);
    
      return rememberFixResultOutputSchema.parse(redactUnknown({
        recorded: true,
        memory_path: memoryPath,
        timestamp
      }));
    }
  • Helper function that resolves the project path for a given analysis_id: first checks the in-memory analysis-store, then the persisted analysis-registry, and finally falls back to resolving the project root from cwd.
    async function resolveMemoryProjectPath(analysisId: string): Promise<string> {
      const inProcessProjectPath = getAnalysisProjectPath(analysisId);
      if (inProcessProjectPath) {
        return inProcessProjectPath;
      }
    
      try {
        const registeredProjectPath = await findRegisteredProjectPath(analysisId);
        if (registeredProjectPath) {
          return registeredProjectPath;
        }
      } catch {
        // Fall back safely if the restart registry is unreadable.
      }
    
      return resolveProjectCwd(process.cwd());
    }
  • Input schema for remember_fix_result: requires analysis_id, fingerprint, stack, fix_attempted, verification_command (must be concrete), verification_result ('passed'|'failed'), and optional notes.
    export const rememberFixResultInputSchema = z.object({
      analysis_id: requiredTrimmedString("analysis_id"),
      fingerprint: requiredTrimmedString("fingerprint"),
      stack: requiredTrimmedString("stack"),
      fix_attempted: requiredTrimmedString("fix_attempted"),
      verification_command: requiredTrimmedString("verification_command").refine(
        (command) => !vagueVerificationCommands.has(command.toLowerCase()),
        "verification_command must be the concrete command that was actually run"
      ),
      verification_result: z.enum(["passed", "failed"]),
      notes: z.string().trim().optional()
    }).strict();
  • Output schema for remember_fix_result: returns recorded (literal true), memory_path, and timestamp.
    export const rememberFixResultOutputSchema = z.object({
      recorded: z.literal(true),
      memory_path: z.string(),
      timestamp: z.string()
    });
  • src/server.ts:38-54 (registration)
    Registration of the 'remember_fix_result' tool in the MCP server. It imports schemas and handler from their respective files and binds them together in registerTool().
    server.registerTool(
      "remember_fix_result",
      {
        title: "Remember Fix Result",
        description:
          "Record verified project-local fix memory only after a fix/change was actually attempted, the verification command was actually run, and the result is clearly passed or failed.",
        inputSchema: rememberFixResultInputSchema.shape,
        outputSchema: rememberFixResultOutputSchema.shape
      },
      async (args) => {
        const output = await rememberFixResult(args);
        return {
          content: [{ type: "text", text: JSON.stringify(output, null, 2) }],
          structuredContent: output
        };
      }
    );
Behavior3/5

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

The description discloses that the tool records memory only under specified conditions. However, it lacks details about side effects, authorization needs, or what happens if conditions are unmet. No annotations exist to supplement.

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, front-loaded with the verb and resource, and includes necessary conditional clauses. No redundant information.

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

Completeness2/5

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

Given the tool has 7 required parameters and no annotations, the description is insufficient. It does not explain what 'fix memory' is, how to obtain analysis_id/fingerprint/stack, or what the output schema contains. An agent would struggle to use this tool correctly.

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

Parameters2/5

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

The schema has 7 parameters with 0% description coverage. The description does not explain any parameters, forcing agents to infer meaning from names alone. This is a significant gap given the tool's complexity.

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: to record a verified fix result after a fix attempt and verification. It specifies the exact conditions (fix attempted, verification run, result passed/failed) and distinguishes from analyze_error.

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

Usage Guidelines4/5

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

The description provides clear context for when to use: only after a fix is attempted and verification run with a clear result. It does not explicitly state when not to use or mention alternatives, but the conditions are well-defined.

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/stfade/moth'

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