Skip to main content
Glama

Search experience

search_experience
Read-onlyIdempotent

Find past task outcomes and lessons by querying project history. Retrieve similar experiences and learned insights to inform current decisions.

Instructions

Search this project's past tasks by description similarity. Returns: structured 'experiences' (id, score, description, class, agent, strategy, status, tool_calls, minutes, files), best match first, plus structured 'lessons' (text, confidence, support). Both lists are empty when nothing is similar enough. Use when: the user asks what was learned or what worked before, or to find an experience id for explain_node or forget_experience. Not for: planning a new task (use get_execution_context). Side effects: none; read-only. Matching is lexical, on task descriptions only. Errors: invalid limit values are rejected by the input schema; an MCP error is returned until the project is approved.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of past tasks to return. Default 5; allowed 1-20.
queryYesWords describing the topic, e.g. 'expired token login bug'. Matched lexically against past task descriptions.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
lessonsYesLessons derived from the returned experiences.
experiencesYesMatching past tasks ordered from best to worst match.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed11 schema fields changedv0.5.1
    • changedInput schema / properties / limit / description
      Previous value: -"Maximum number of past tasks to return, 1-20; values outside the range are clamped. Default 5."New value: +"Maximum number of past tasks to return. Default 5; allowed 1-20."
    • addedInput schema / properties / limit / maximum
      Added value: +20
    • addedInput schema / properties / limit / minimum
      Added value: +1
    • addedInput schema / properties / query / maxLength
      Added value: +1000
    • addedInput schema / properties / query / minLength
      Added value: +1
    • addedOutput schema / $defs
      Added value: +{
      +  "ExperienceSummary": {
      +    "properties": {
      +      "agent": {
      +        "description": "Agent that produced the experience.",
      +        "title": "Agent",
      +        "type": "string"
      +      },
      +      "class": {
      +        "description": "OpenReflex task class.",
      +        "title": "Class",
      +        "type": "string"
      +      },
      +      "description": {
      +        "description": "Redacted task description stored for the past execution.",
      +        "title": "Description",
      +        "type": "string"
      +      },
      +      "files": {
      +        "description": "Project-relative files associated with the execution, capped for compactness.",
      +        "items": {
      +          "type": "string"
      +        },
      +        "title": "Files",
      +        "type": "array"
      +      },
      +      "id": {
      +        "description": "Experience Graph id for the past task.",
      +        "title": "Id",
      +        "type": "string"
      +      },
      +      "minutes": {
      +        "description": "Active execution time in minutes.",
      +        "minimum": 0,
      +        "title": "Minutes",
      +        "type": "number"
      +      },
      +      "score": {
      +        "description": "Similarity/retrieval score for this query; higher ranks first.",
      +        "title": "Score",
      +        "type": "number"
      +      },
      +      "status": {
      +        "description": "Observed outcome status: success, failure or unknown.",
      +        "title": "Status",
      +        "type": "string"
      +      },
      +      "strategy": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "Strategy used for the past task when known.",
      +        "title": "Strategy"
      +      },
      +      "tool_calls": {
      +        "description": "Number of captured tool calls in the execution.",
      +        "minimum": 0,
      +        "title": "Tool Calls",
      +        "type": "integer"
      +      }
      +    },
      +    "required": [
      +      "id",
      +      "score",
      +      "description",
      +      "class",
      +      "agent",
      +      "strategy",
      +      "status",
      +      "tool_calls",
      +      "minutes",
      +      "files"
      +    ],
      +    "title": "ExperienceSummary",
      +    "type": "object"
      +  },
      +  "LessonSummary": {
      +    "properties": {
      +      "confidence": {
      +        "description": "Combined confidence in this lesson.",
      +        "maximum": 1,
      +        "minimum": 0,
      +        "title": "Confidence",
      +        "type": "number"
      +      },
      +      "support": {
      +        "description": "Number of experiences supporting the lesson.",
      +        "minimum": 1,
      +        "title": "Support",
      +        "type": "integer"
      +      },
      +      "text": {
      +        "description": "A compact lesson extracted from one or more past executions.",
      +        "title": "Text",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "text",
      +      "confidence",
      +      "support"
      +    ],
      +    "title": "LessonSummary",
      +    "type": "object"
      +  }
      +}
    • addedOutput schema / properties / experiences
      Added value: +{
      +  "description": "Matching past tasks ordered from best to worst match.",
      +  "items": {
      +    "$ref": "#/$defs/ExperienceSummary"
      +  },
      +  "title": "Experiences",
      +  "type": "array"
      +}
    • addedOutput schema / properties / lessons
      Added value: +{
      +  "description": "Lessons derived from the returned experiences.",
      +  "items": {
      +    "$ref": "#/$defs/LessonSummary"
      +  },
      +  "title": "Lessons",
      +  "type": "array"
      +}
    • removedOutput schema / properties / result
      Removed value: -{
      -  "title": "Result",
      -  "type": "string"
      -}
    • changedOutput schema / required
      Previous value: -[
      -  "result"
      -]New value: +[
      +  "experiences",
      +  "lessons"
      +]
    • changedOutput schema / title
      Previous value: -"search_experienceOutput"New value: +"SearchExperienceResult"
  2. Changed2 schema fields changedv0.3.2
    • addedInput schema / properties / limit / description
      Added value: +"Maximum number of past tasks to return, 1-20; values outside the range are clamped. Default 5."
    • addedInput schema / properties / query / description
      Added value: +"Words describing the topic, e.g. 'expired token login bug'. Matched lexically against past task descriptions."
  3. First observedv0.1.3

TDQS

A4.7/5.0
Behavior5/5

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

Adds meaningful behavior beyond the annotations: describes return ordering, empty-list behavior, lexical matching scope, side-effect-free read-only nature, and error conditions including the approval requirement. This is rich contextual information that helps the agent predict tool behavior accurately.

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?

Well-structured with labeled sections: Returns, Use when, Not for, Side effects, Errors. Every sentence provides distinct value, and the most important usage guidance is front-loaded near the top.

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

Completeness5/5

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

Combined with a fully documented input schema, rich annotations, and an output schema, the description covers purpose, usage scenarios, exclusions, side effects, return behavior, and error cases. Nothing critical for an agent to select and invoke the tool correctly is missing.

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?

Input schema descriptions cover 100% of parameters, so the description is not required to re-document them. It adds minor context about lexical matching and validation errors, but the schema already explains query and limit adequately, making the baseline 3 appropriate.

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?

States a specific verb and resource: 'Search this project's past tasks by description similarity.' It clearly identifies what the tool does and distinguishes itself from siblings by naming get_execution_context as the alternative for planning.

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

Usage Guidelines5/5

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

Provides explicit 'Use when' conditions: asking what was learned or worked before, or finding an experience id for explain_node or forget_experience. It also states what it is not for and names the alternative tool, leaving no ambiguity about when to invoke it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.