Skip to main content
Glama

append_feedback_context

Destructive

Append user's additional context to a thumbs-up or thumbs-down feedback session for improving agent behavior.

Instructions

Append a follow-up message to an open feedback session. Call this when the user types additional context after giving thumbs up/down.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionIdYes
messageYesThe follow-up message from the user
roleNouser

Implementation Reference

  • The actual implementation of appendFeedbackContext. It appends a follow-up message to an open feedback session, capping the message at 1000 characters and enforcing a max of 20 messages per session.
    function appendToSession(sessionId, message, role = 'user') {
      const session = activeSessions.get(sessionId);
      if (!session) {
        return { status: 'not_found', message: `No active session: ${sessionId}` };
      }
      if (session.status !== 'open') {
        return { status: 'closed', message: `Session already finalized at ${session.finalizedAt}` };
      }
      if (session.followUpMessages.length >= MAX_FOLLOWUP_MESSAGES) {
        return { status: 'full', message: `Session has reached max ${MAX_FOLLOWUP_MESSAGES} messages` };
      }
    
      session.followUpMessages.push({
        role,
        content: (message || '').slice(0, 1000), // Cap per-message
        timestamp: new Date().toISOString(),
      });
    
      resetSessionTimer(sessionId, session);
    
      return {
        status: 'appended',
        messageCount: session.followUpMessages.length,
        sessionId,
      };
    }
  • Import/alias registration: appendFeedbackContext is the alias for appendToSession from scripts/feedback-session.js.
    const {
      openSession: openFeedbackSession,
      appendToSession: appendFeedbackContext,
      finalizeSession: finalizeFeedbackSession,
    } = require('../../scripts/feedback-session');
  • MCP handler dispatch: when tool name is 'append_feedback_context', calls appendFeedbackContext(args.sessionId, args.message, args.role).
    case 'open_feedback_session':
      return toTextResult(openFeedbackSession(args.feedbackEventId, args.signal, args.initialContext));
    case 'append_feedback_context':
      return toTextResult(appendFeedbackContext(args.sessionId, args.message, args.role));
    case 'finalize_feedback_session':
  • Module exports showing appendToSession is the exported name of the function bound to appendFeedbackContext.
    module.exports = {
      openSession,
      appendToSession,
      finalizeSession,
      getSession,
      getActiveSession,
      extractComplaints,
      autoInferLesson,
      SESSION_TIMEOUT_MS,
      MAX_FOLLOWUP_MESSAGES,
      scheduleTimer,
      // For testing
      _activeSessions: activeSessions,
    };
Behavior3/5

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

Annotations already mark destructiveHint=true, so the description's lack of explicit side effect details is mitigated. However, it doesn't clarify what 'append' entails (e.g., modifies session state, irreversible) which would add value beyond the annotation.

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?

Two sentences, front-loading the action and then the usage scenario. Every sentence adds value. No wasted words.

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?

Lacks details on return value, side effects (beyond destructive hint), prerequisites (e.g., open session), and error conditions. For a tool with no output schema and moderate complexity, these gaps reduce completeness.

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?

Only one of three parameters (message) has a description in the schema. The description reiterates that parameter ('follow-up message') but adds no meaning for sessionId or role. With 33% coverage, the description fails to compensate for the missing parameter descriptions.

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?

Explicitly states the action (append a follow-up message) and the resource (open feedback session). Distinguishes from siblings like 'capture_feedback' and 'open_feedback_session' by specifying the context of additional input after thumbs up/down.

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?

Clearly indicates when to use: 'when the user types additional context after giving thumbs up/down'. No explicit exclusions, but the scenario is well-defined. Could mention prerequisites (e.g., existence of open session) or alternatives.

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/IgorGanapolsky/ThumbGate'

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