Skip to main content
Glama

find_prior_work

Read-only

Search past AI coding-agent conversation threads for similar tasks and return their best-matching decisions or gotchas. Use at the start of a task to avoid repeating prior work.

Instructions

"Have I done this before?" Pass a short task description; returns past threads that tackled something similar, each with its best-matching decision or gotcha. Call at the start of a task.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>"
    },
    "name": "find_prior_work"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMax threads (default 5, max 20).
queryYesShort description of the task or problem.
projectNoProject path substring. Empty = all projects.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.11.4
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "anyOf": [
      +    {
      +      "properties": {
      +        "threads": {
      +          "items": {
      +            "properties": {
      +              "kind": {
      +                "type": "string"
      +              },
      +              "matches": {
      +                "type": "integer"
      +              },
      +              "projectPath": {
      +                "type": [
      +                  "string",
      +                  "null"
      +                ]
      +              },
      +              "similarity": {
      +                "type": "number"
      +              },
      +              "snippet": {
      +                "type": "string"
      +              },
      +              "source": {
      +                "type": "string"
      +              },
      +              "threadId": {
      +                "type": "integer"
      +              },
      +              "title": {
      +                "type": [
      +                  "string",
      +                  "null"
      +                ]
      +              }
      +            },
      +            "required": [
      +              "threadId",
      +              "title",
      +              "projectPath",
      +              "source",
      +              "kind",
      +              "snippet",
      +              "similarity",
      +              "matches"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        }
      +      },
      +      "required": [
      +        "threads"
      +      ],
      +      "type": "object"
      +    },
      +    {
      +      "properties": {
      +        "notice": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "notice"
      +      ],
      +      "type": "object"
      +    }
      +  ],
      +  "type": "object"
      +}
  2. Changed5 schema fields changedv0.11.3
    • removedInput schema / $schema
      Removed value: -"https://json-schema.org/draft/2020-12/schema"
    • changedInput schema / properties / limit / description
      Previous value: -"Max facts to return (default 20)."New value: +"Max threads (default 5, max 20)."
    • changedInput schema / properties / project / description
      Previous value: -"Substring-match the project path to scope results. Empty = all projects."New value: +"Project path substring. Empty = all projects."
    • changedInput schema / properties / query / description
      Previous value: -"What to recall about (e.g. \"auth token refresh\", \"database migration approach\")."New value: +"Short description of the task or problem."
    • removedInput schema / title
      Removed value: -"RecallArgs"
  3. Addedv0.6.0

TDQS

A4/5.0
Behavior4/5

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

The annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered. The description adds real value beyond that by revealing the retrieval model: it is a semantic similarity match on past threads, and each result is distilled to its single best-matching decision or gotcha rather than a raw thread. It does not discuss ranking quality or how matches are scored, which leaves a small gap.

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 short sentences, front-loaded with the question the agent is actually trying to answer. Nothing is padded or redundant, and the usage instruction lands last as a clean call to action.

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

Completeness4/5

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

An output schema exists, so the description need not enumerate return fields, and it correctly characterizes results at a high level instead. For a three-parameter read-only lookup, the remaining needs are covered. Only the absence of sibling disambiguation keeps it from being fully complete.

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 coverage is 100%, so query, limit, and project are all documented in the schema. The description reinforces the intent of query as a 'short task description', which is a useful nudge toward phrasing rather than keywords. It adds nothing about project scoping or the default/max limit values, so the baseline 3 is correct.

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 gives a concrete verb and resource: it takes a task description and returns past threads that tackled something similar, each paired with a matching decision or gotcha. The 'Have I done this before?' framing makes the retrieval semantics immediate. It stops short of naming a sibling it differs from (e.g. search_threads or recall_decisions), so the boundary is inferred rather than stated.

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?

The final sentence explicitly says when to call it: 'Call at the start of a task.' That is clear and actionable context. There are no when-not conditions and no named alternatives for the keyword-search or decision-lookup siblings, so the agent must guess the boundary itself.

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