Skip to main content
Glama

Capture Outcome

localnest_capture_outcome

Capture task outcomes into a local memory pipeline by recording details like status, summary, and metadata for project tracking.

Instructions

Capture a meaningful task outcome into the memory event pipeline with a simpler payload.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taskNo
titleNo
summaryNo
detailsNo
contentNo
event_typeNotask
statusNocompleted
kindNoknowledge
importanceNo
confidenceNo
files_changedNo
has_testsNo
tagsNo
linksNo
root_pathNo
project_pathNo
branch_nameNo
topicNo
featureNo
source_refNo
response_formatNojson

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYes
metaNo

Implementation Reference

  • The `captureOutcome` method in `MemoryWorkflowService` handles the logic for capturing task outcomes, normalizing the input, and calling `this.memory.captureEvent`.
    async captureOutcome(input = {}) {
      const memoryStatus = await this.memory.getStatus();
      const runtime = this.getRuntimeSummary ? await this.getRuntimeSummary() : null;
      const memorySummary = compactMemoryStatus(memoryStatus);
    
      if (!memorySummary.enabled) {
        return {
          captured: false,
          skipped_reason: 'memory_disabled',
          runtime,
          memory: memorySummary
        };
      }
    
      if (!memorySummary.backend_available) {
        return {
          captured: false,
          skipped_reason: 'backend_unavailable',
          runtime,
          memory: memorySummary
        };
      }
    
      const eventType = cleanText(input.event_type || input.eventType || input.outcome_type || 'task', 60) || 'task';
      const task = cleanText(input.task || input.title, 400);
      const summary = cleanText(input.summary, 4000);
      const details = cleanText(input.details || input.content, 20000);
      const fallbackContent = cleanText([summary, details, task].filter(Boolean).join('. '), 20000);
    
      if (!task && !summary && !details) {
        throw new Error('task, summary, or details is required');
      }
    
      const captureInput = {
        event_type: eventType,
        status: defaultEventStatus(eventType, input.status),
        title: task || summary || details,
        summary,
        content: details || fallbackContent,
        kind: input.kind,
        importance: input.importance,
        confidence: input.confidence,
        files_changed: input.files_changed ?? input.filesChanged ?? 0,
        has_tests: input.has_tests ?? input.hasTests ?? false,
        tags: uniqueStrings([
          ...(input.tags || []),
          input.topic,
          input.feature
        ]),
        links: Array.isArray(input.links) ? input.links.slice(0, 50) : [],
        scope: {
          root_path: input.root_path || input.rootPath,
          project_path: input.project_path || input.projectPath,
          branch_name: input.branch_name || input.branchName,
          topic: input.topic,
          feature: input.feature
        },
        source_ref: cleanText(input.source_ref || input.sourceRef, 1000)
      };
    
      const result = await this.memory.captureEvent(captureInput);
      return {
        captured: true,
        runtime,
        memory: memorySummary,
        event: captureInput,
        result
      };
    }
  • The `localnest_capture_outcome` tool is registered here, delegating the call to `memoryWorkflow.captureOutcome`.
    registerJsonTool(
      ['localnest_capture_outcome'],
      {
        title: 'Capture Outcome',
        description: 'Capture a meaningful task outcome into the memory event pipeline with a simpler payload.',
        inputSchema: {
          task: z.string().optional(),
          title: z.string().optional(),
          summary: z.string().optional(),
          details: z.string().optional(),
          content: z.string().optional(),
          event_type: MEMORY_EVENT_TYPE_SCHEMA,
          status: MEMORY_EVENT_STATUS_SCHEMA.optional(),
          kind: MEMORY_KIND_SCHEMA.optional(),
          importance: z.number().int().min(0).max(100).optional(),
          confidence: z.number().min(0).max(1).optional(),
          files_changed: z.number().int().min(0).max(10000).default(0),
          has_tests: z.boolean().default(false),
          tags: z.array(z.string()).max(50).default([]),
          links: z.array(MEMORY_LINK_SCHEMA).max(50).default([]),
          root_path: z.string().optional(),
          project_path: z.string().optional(),
          branch_name: z.string().optional(),
          topic: z.string().optional(),
          feature: z.string().optional(),
          source_ref: z.string().max(1000).default('')
        },
        annotations: {
          readOnlyHint: false,
          destructiveHint: false,
          idempotentHint: false,
          openWorldHint: false
        }
      },
      async (args) => normalizeCaptureOutcomeResult(await memoryWorkflow.captureOutcome(args))
    );
Behavior3/5

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

Annotations declare this is a non-readonly, non-idempotent write operation. The description adds useful context about the 'memory event pipeline' destination but omits behavioral details like deduplication logic, persistence guarantees, or the implications of the idempotentHint: false annotation for retries.

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

Conciseness3/5

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

The single-sentence structure is efficient but undersized for the tool's complexity (21 parameters). The phrase 'simpler payload' raises questions without providing immediate clarification, reducing the sentence's informational value relative to the tool's operational weight.

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 21 parameters, 0% schema coverage, and the existence of similar memory tools, the description is inadequate. It lacks explanation of the output schema, parameter relationships, or the specific domain model (what constitutes a 'meaningful' task outcome versus a regular event).

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?

With 0% schema description coverage across 21 parameters, the description fails to compensate for the undocumented parameters. While it mentions a 'simpler payload,' it does not explain which parameters are essential, how they relate to the 'simpler' nature, or provide examples of expected values for critical fields like event_type or status.

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?

The description states a specific action (capture) and target (task outcome into memory event pipeline). It hints at differentiation from siblings via 'simpler payload,' though it doesn't explicitly name the alternative (localnest_memory_capture_event) or fully clarify what 'simpler' entails.

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?

The description provides no explicit guidance on when to use this tool versus its obvious sibling localnest_memory_capture_event, nor does it mention prerequisites or conditions. The phrase 'simpler payload' implies a comparison but fails to specify selection criteria.

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/wmt-mobile/localnest'

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