Skip to main content
Glama

soul_self_evaluate

Self-evaluate a complex response by recording a descriptive summary of its dynamics, such as word count or relevance to the query.

Instructions

Record a self-evaluation of a complex response. Be descriptive: 'Response used 450 words for a simple question' not 'bad response'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
summaryYesBrief descriptive summary of the response and its dynamics

Implementation Reference

  • The handler function that executes the soul_self_evaluate tool logic. It takes a descriptive summary string, checks configuration, generates self-signals (MicroSignal) based on keywords in the summary (e.g., 'too long', 'too short', 'pattern match', 'successful'), and appends them to the signal store via appendSignals. Returns a formatted result string describing the number and types of signals generated.
    export async function handleSoulEvaluate(
      summary: string,
    ): Promise<string> {
      const config = await loadConfig();
      if (!config.selfEvaluation.enabled) {
        return "Self-evaluation is disabled in config.";
      }
    
      const frameworkEngine = new FrameworkEngine();
      const store = await frameworkEngine.initialize();
      const activeFrameworks = store.frameworks.filter(
        (f) => f.status === "active" || f.status === "questioning",
      );
    
      // Generate self-signals from the summary
      const selfSignals: MicroSignal[] = [];
      const sessionKey = crypto.randomUUID().slice(0, 8);
      const selfWeight = config.selfEvaluation.weight; // 0.5x
    
      // Check for length/depth mismatch indicators
      if (/too (long|verbose|detailed|much)/i.test(summary)) {
        selfSignals.push({
          timestamp: Date.now(),
          sessionKey,
          type: "disengagement",
          evidence: `Self-eval: ${summary.slice(0, 150)}`,
          source: "self",
          confidence: 0.6 * selfWeight,
          userSnippets: [],
          assistantSnippets: [],
        });
      }
    
      if (/too (short|brief|terse)/i.test(summary)) {
        selfSignals.push({
          timestamp: Date.now(),
          sessionKey,
          type: "depth_change",
          evidence: `Self-eval: ${summary.slice(0, 150)}`,
          source: "self",
          confidence: 0.6 * selfWeight,
          userSnippets: [],
          assistantSnippets: [],
        });
      }
    
      if (/pattern.?match|generic|surface/i.test(summary)) {
        selfSignals.push({
          timestamp: Date.now(),
          sessionKey,
          type: "correction",
          evidence: `Self-eval: detected pattern-matching instead of first-principles. ${summary.slice(0, 100)}`,
          source: "self",
          confidence: 0.5 * selfWeight,
          userSnippets: [],
          assistantSnippets: [],
        });
      }
    
      if (/successful|well.?received|good fit|aligned/i.test(summary)) {
        selfSignals.push({
          timestamp: Date.now(),
          sessionKey,
          type: "success",
          evidence: `Self-eval: ${summary.slice(0, 150)}`,
          source: "self",
          confidence: 0.5 * selfWeight,
          userSnippets: [],
          assistantSnippets: [],
        });
      }
    
      // Always generate a general self-observation signal
      if (selfSignals.length === 0) {
        selfSignals.push({
          timestamp: Date.now(),
          sessionKey,
          type: "depth_change",
          evidence: `Self-eval observation: ${summary.slice(0, 150)}`,
          source: "self",
          confidence: 0.4 * selfWeight,
          userSnippets: [],
          assistantSnippets: [],
        });
      }
    
      await appendSignals(selfSignals);
    
      const frameworkNames = activeFrameworks.slice(0, 5).map((f) => f.name);
    
      return [
        `Self-evaluation recorded: ${selfSignals.length} self-signal(s) (weighted at ${selfWeight}x).`,
        `Types: ${selfSignals.map((s) => s.type).join(", ")}`,
        "",
        `Active frameworks checked against: ${frameworkNames.join(", ")}`,
        "",
        "Self-signals will be factored into the next reflection cycle.",
      ].join("\n");
    }
Behavior2/5

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

No annotations are provided, and the description does not disclose behavioral traits like side effects, storage, or retrieval. It only states the action without clarifying whether it is read-only or destructive.

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 two sentences, front-loaded with the purpose, and every word adds value. No redundancy or fluff.

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?

For a simple one-parameter tool with no output schema, the description covers purpose and parameter usage. However, it lacks context about what the evaluation record is used for or how it integrates with sibling tools.

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

Parameters4/5

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

The schema describes the parameter as 'Brief descriptive summary', and the tool description adds an example with contrast to poor examples, providing meaningful guidance beyond the schema.

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 verb 'Record' and the resource 'self-evaluation of a complex response'. It distinguishes from siblings like soul_reflect or soul_status by focusing on evaluating a specific response.

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?

No guidance on when to use this tool versus alternatives such as soul_reflect or soul_signal. The description only implies usage for complex responses but does not specify exclusions or conditions.

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/DomDemetz/claude-soul'

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