Skip to main content
Glama

record_outcome

Logs positive, negative, or neutral outcomes for instincts to track performance and adjust confidence levels with optional explanatory notes.

Instructions

Record a positive, negative, or neutral outcome for an instinct

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesInstinct ID
resultYesOutcome result
deltaYesConfidence change (e.g. +0.05 or -0.1)
noteNoOptional note explaining the outcome

Implementation Reference

  • Implementation of the recordOutcome method which updates an instinct's confidence and logs the outcome.
    async recordOutcome(
      id: string,
      result: 'positive' | 'negative' | 'neutral',
      delta: number,
      note?: string,
    ): Promise<Instinct> {
      const entry = await this.find(id);
      if (!entry) throw new Error(`Instinct not found: ${id}`);
    
      const { file, instinctFile, instinct } = entry;
    
      const outcome: OutcomeEntry = {
        timestamp: new Date().toISOString(),
        result,
        delta_confidence: delta,
        note,
      };
      instinct.outcome_log.push(outcome);
      instinct.confidence = Math.max(0, Math.min(1, instinct.confidence + delta));
      instinct.updated_at = new Date().toISOString();
    
      instinctFile.instincts[id] = instinct;
      await this.loader.save(file, instinctFile);
    
      return instinct;
    }
  • MCP tool handler case for 'record_outcome' that invokes Registry.recordOutcome.
    case 'record_outcome': {
      const id = String(args?.['id'] ?? '');
      const result = String(args?.['result'] ?? '') as 'positive' | 'negative' | 'neutral';
      const delta = Number(args?.['delta'] ?? 0);
      const note = args?.['note'] ? String(args['note']) : undefined;
      if (!id || !result) return { content: [{ type: 'text', text: 'Error: id and result are required' }] };
      try {
        const instinct = await registry.recordOutcome(id, result, delta, note);
        return { content: [{ type: 'text', text: JSON.stringify({ id, result, new_confidence: instinct.confidence, outcomes: instinct.outcome_log.length }, null, 2) }] };
      } catch (e) {
        return { content: [{ type: 'text', text: `Error: ${e instanceof Error ? e.message : String(e)}` }] };
      }
    }
Behavior2/5

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

No annotations provided, so description carries full burden of behavioral disclosure. It fails to explain that this operation likely persists data, modifies instinct confidence (implied by 'delta' parameter but not described), or affects future instinct retrieval. No mention of idempotency, validation rules, or return value structure.

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?

Single sentence, nine words, front-loaded with action verb. No redundancy or filler. Every word earns its place by defining the operation, target, and valid categorical inputs.

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 high schema richness (100% coverage, 4 simple parameters) and no output schema, the description is minimally adequate. However, for a mutation tool with no annotations, it should explain the side effect (updating instinct state) and expected return value (success indicator or updated object).

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?

Schema description coverage is 100%, so baseline is 3. The description mirrors the enum values in the schema but adds no additional syntax guidance, format examples (beyond the delta example already in schema), or explanations of relationships between parameters (e.g., that negative result usually pairs with negative delta).

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

Purpose4/5

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

States a specific verb (Record), target resource (instinct), and valid value range (positive/negative/neutral) that maps to the enum. Distinguishes from siblings like store_instinct (creation) and approve_instinct (workflow state), though it could clarify what constitutes an 'outcome' in this domain (e.g., feedback, test result).

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

Usage Guidelines2/5

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

Provides no explicit when-to-use guidance or prerequisites. Does not mention that this should be called after an instinct has been executed/tested, nor does it contrast with reject_instinct (which might be for pre-execution rejection vs post-execution negative outcomes). Usage must be inferred from the parameter names.

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/doobidoo/MCP-Context-Provider'

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