Skip to main content
Glama

Local Project Memory Search

project_memory_search
Read-onlyIdempotent

Search local project knowledge—papers, code, plans, experiments, decisions—via exact, BM25, vector, and graph retrieval. Returns ranked summaries from indexed files without external access.

Instructions

LOCAL PROJECT KNOWLEDGE SEARCH ONLY. With research enabled, one local broker lets multiple MCP sessions query the same knowledge base concurrently and orders writes safely. Always use this tool when the user asks to find, recall, inspect, or search information already stored in project memory, indexed local roots, papers, codebases, plans, experiments, or decisions. Use query_variants for multiple retrieval angles in one call instead of opening terminals or calling this tool repeatedly. Query embeddings are batched, candidates are fused with RRF, graph expansion starts from retrieved evidence, and the primary query is reranked once. Only bounded query-focused summaries from that final ranking are returned; stored bodies never bypass this response gate. If one retrieval lane times out, the other lanes still return and meta.degraded_lanes identifies the partial lane; do not repeat the same query automatically. Uses exact, BM25, vector, and graph retrieval. It never opens Google, a browser, or SearchApi. Use search or search_parallel only when new external information is required.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum local RAG results.
queryNoOne natural-language query over indexed local project knowledge. Use queries instead for independent grouped answers.
filtersNoOptional project, source, type, role, lane, and recorded-time filters. Excluded lanes are not executed.
queriesNoIndependent questions returned as separate ranked groups inside one broker request.
project_idNoPrimary project to search. Required unless all_projects=true.
request_idNoCaller-chosen ID for one local query. Supply it before a long request so project_memory query_status/query_cancel can inspect or cancel the same operation.
all_projectsNoSearch every active named project. Excludes Inbox and cannot be combined with project ids.
query_variantsNoOptional retrieval variants executed inside this one broker request. Exact identifiers and quoted phrases are added deterministically, candidates are fused with RRF, and the primary query is reranked once. Do not make repeated terminal or tool calls for query variants.
include_project_idsNoAdditional read-only projects searched with the primary project.
response_deadline_msNoCaller-selected 1-300 second response deadline. Returns available lane results or QUERY_TIMEOUT with request_id. Native reads remain tracked until they settle; stored evidence and writes are unaffected.
response_budget_bytesNoExplicit result-array byte budget. Without an override, summaries adapt to unique result, question and source-family counts. Stored bodies and retrieval scope are not truncated by this budget; envelope metadata is separate.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
jobNo
diffNo
metaNo
errorNo
indexNo
plansNo
queryNo
doctorNo
entityNo
forgetNo
groupsNo
memoryNo
recordNo
contextNo
currentNo
projectNo
receiptNo
recordsNo
resultsNo
sessionNo
entitiesNo
importedNo
projectsNo
receiptsNo
snapshotNo
timelineNo
assertionNo
decisionsNo
elapsed_msNo
job_countsNo
plan_countNo
experimentsNo
entity_countNo
query_statusNo
verificationNo
memory_handleNo
session_countNo
visualizationNo
decision_countNo
document_countNo
assertion_countNo
correction_countNo
experiment_countNo
search_event_countNo
source_entry_countNo
active_source_snapshotNo
entity_operation_countNo
citation_observation_countNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed29 schema fields changedv1.1.3
    • addedInput schema / properties / filters
      Added value: +{
      +  "description": "Optional project, source, type, role, lane, and recorded-time filters. Excluded lanes are not executed.",
      +  "properties": {
      +    "kinds": {
      +      "items": {
      +        "maxLength": 100,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "maxItems": 20,
      +      "type": "array"
      +    },
      +    "recorded_after": {
      +      "format": "date-time",
      +      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
      +      "type": "string"
      +    },
      +    "recorded_before": {
      +      "format": "date-time",
      +      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
      +      "type": "string"
      +    },
      +    "retrieval_lanes": {
      +      "items": {
      +        "enum": [
      +          "exact",
      +          "bm25",
      +          "vector",
      +          "graph"
      +        ],
      +        "type": "string"
      +      },
      +      "maxItems": 4,
      +      "type": "array"
      +    },
      +    "roles": {
      +      "items": {
      +        "enum": [
      +          "experiment_record",
      +          "result",
      +          "method",
      +          "log",
      +          "paper",
      +          "plan",
      +          "config",
      +          "source",
      +          "report",
      +          "other"
      +        ],
      +        "type": "string"
      +      },
      +      "maxItems": 10,
      +      "type": "array"
      +    },
      +    "source_families": {
      +      "items": {
      +        "enum": [
      +          "document",
      +          "code",
      +          "graph"
      +        ],
      +        "type": "string"
      +      },
      +      "maxItems": 3,
      +      "type": "array"
      +    }
      +  },
      +  "type": "object"
      +}
    • addedInput schema / properties / queries
      Added value: +{
      +  "description": "Independent questions returned as separate ranked groups inside one broker request.",
      +  "items": {
      +    "properties": {
      +      "id": {
      +        "maxLength": 100,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "limit": {
      +        "maximum": 20,
      +        "minimum": 1,
      +        "type": "integer"
      +      },
      +      "query": {
      +        "maxLength": 400,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "query_variants": {
      +        "items": {
      +          "maxLength": 400,
      +          "minLength": 1,
      +          "type": "string"
      +        },
      +        "maxItems": 19,
      +        "type": "array"
      +      }
      +    },
      +    "required": [
      +      "id",
      +      "query"
      +    ],
      +    "type": "object"
      +  },
      +  "maxItems": 20,
      +  "minItems": 1,
      +  "type": "array"
      +}
    • changedInput schema / properties / query / description
      Previous value: -"Natural-language query over indexed local project knowledge."New value: +"One natural-language query over indexed local project knowledge. Use queries instead for independent grouped answers."
    • addedInput schema / properties / request_id
      Added value: +{
      +  "description": "Caller-chosen ID for one local query. Supply it before a long request so project_memory query_status/query_cancel can inspect or cancel the same operation.",
      +  "maxLength": 200,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / properties / response_budget_bytes
      Added value: +{
      +  "description": "Explicit result-array byte budget. Without an override, summaries adapt to unique result, question and source-family counts. Stored bodies and retrieval scope are not truncated by this budget; envelope metadata is separate.",
      +  "maximum": 1000000,
      +  "minimum": 1000,
      +  "type": "integer"
      +}
    • addedInput schema / properties / response_deadline_ms
      Added value: +{
      +  "description": "Caller-selected 1-300 second response deadline. Returns available lane results or QUERY_TIMEOUT with request_id. Native reads remain tracked until they settle; stored evidence and writes are unaffected.",
      +  "maximum": 300000,
      +  "minimum": 1000,
      +  "type": "integer"
      +}
    • removedInput schema / required
      Removed value: -[
      -  "query"
      -]
    • addedOutput schema / properties / context
      Added value: +{
      +  "additionalProperties": {},
      +  "propertyNames": {
      +    "type": "string"
      +  },
      +  "type": "object"
      +}
    • addedOutput schema / properties / current
      Added value: +{
      +  "additionalProperties": {},
      +  "propertyNames": {
      +    "type": "string"
      +  },
      +  "type": "object"
      +}
    • addedOutput schema / properties / diff
      Added value: +{
      +  "additionalProperties": {},
      +  "propertyNames": {
      +    "type": "string"
      +  },
      +  "type": "object"
      +}
    • addedOutput schema / properties / doctor
      Added value: +{
      +  "additionalProperties": {},
      +  "propertyNames": {
      +    "type": "string"
      +  },
      +  "type": "object"
      +}
    • addedOutput schema / properties / error / properties / cancel_reason
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / error / properties / phase
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / error / properties / request_id
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / groups
      Added value: +{
      +  "items": {
      +    "additionalProperties": {},
      +    "propertyNames": {
      +      "type": "string"
      +    },
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / imported
      Added value: +{
      +  "additionalProperties": {},
      +  "propertyNames": {
      +    "type": "string"
      +  },
      +  "type": "object"
      +}
    • addedOutput schema / properties / job
      Added value: +{
      +  "additionalProperties": {},
      +  "propertyNames": {
      +    "type": "string"
      +  },
      +  "type": "object"
      +}
    • addedOutput schema / properties / query_status
      Added value: +{
      +  "additionalProperties": {},
      +  "propertyNames": {
      +    "type": "string"
      +  },
      +  "type": "object"
      +}
    • addedOutput schema / properties / receipt
      Added value: +{
      +  "additionalProperties": {},
      +  "propertyNames": {
      +    "type": "string"
      +  },
      +  "type": "object"
      +}
    • addedOutput schema / properties / receipts
      Added value: +{
      +  "items": {
      +    "additionalProperties": {},
      +    "propertyNames": {
      +      "type": "string"
      +    },
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / records
      Added value: +{
      +  "items": {
      +    "additionalProperties": {},
      +    "propertyNames": {
      +      "type": "string"
      +    },
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / results / items / properties / body_handle
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / results / items / properties / index_freshness
      Added value: +{
      +  "enum": [
      +    "current",
      +    "stale"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / results / items / properties / record_id
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / results / items / properties / revision_id
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / results / items / properties / source_span
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "end": {
      +      "maximum": 9007199254740991,
      +      "minimum": -9007199254740991,
      +      "type": "integer"
      +    },
      +    "start": {
      +      "maximum": 9007199254740991,
      +      "minimum": -9007199254740991,
      +      "type": "integer"
      +    }
      +  },
      +  "required": [
      +    "start",
      +    "end"
      +  ],
      +  "type": "object"
      +}
    • addedOutput schema / properties / snapshot
      Added value: +{
      +  "additionalProperties": {},
      +  "propertyNames": {
      +    "type": "string"
      +  },
      +  "type": "object"
      +}
    • addedOutput schema / properties / timeline
      Added value: +{
      +  "additionalProperties": {},
      +  "propertyNames": {
      +    "type": "string"
      +  },
      +  "type": "object"
      +}
    • addedOutput schema / properties / verification
      Added value: +{
      +  "additionalProperties": {},
      +  "propertyNames": {
      +    "type": "string"
      +  },
      +  "type": "object"
      +}
  2. Changed3 schema fields changedv1.0.6
    • addedOutput schema / properties / decision_count
      Added value: +{
      +  "type": "number"
      +}
    • addedOutput schema / properties / experiment_count
      Added value: +{
      +  "type": "number"
      +}
    • addedOutput schema / properties / plan_count
      Added value: +{
      +  "type": "number"
      +}
  3. Changed1 schema field changedv1.0.4
    • addedInput schema / properties / query_variants
      Added value: +{
      +  "description": "Optional retrieval variants executed inside this one broker request. Exact identifiers and quoted phrases are added deterministically, candidates are fused with RRF, and the primary query is reranked once. Do not make repeated terminal or tool calls for query variants.",
      +  "items": {
      +    "maxLength": 400,
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  "maxItems": 19,
      +  "type": "array"
      +}
  4. Changed2 schema fields changedv1.0.2
    • addedOutput schema / properties / results / items / properties / source_length
      Added value: +{
      +  "type": "number"
      +}
    • addedOutput schema / properties / results / items / properties / truncated
      Added value: +{
      +  "type": "boolean"
      +}
  5. Addedv1.0.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already show readOnlyHint=true, openWorldHint=false, and idempotentHint=true, and the description adds substantial non-obvious behavior: broker-based concurrency and write ordering, RRF fusion and reranking, the response gate that returns only bounded summaries, degraded-lane timeout behavior, and the explicit guarantee that it never opens external sources. No contradiction exists.

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

Conciseness4/5

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

The opening line is emphatic and front-loaded, and the paragraph is dense rather than padded. Some redundancy exists (retrieval lanes are named both as behavior and as a parameter concept), and the broker/concurrency sentence is useful context but not essential to invoking the tool. Overall, nearly every sentence earns its place, though a slightly tighter structure would improve scannability.

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?

For an 11-parameter tool with nested objects and an output schema, the description covers the critical contexts: when to choose it, what it will not do, how failures surface, how results are bounded, and how variants/timeouts behave. The schema already documents parameter details, so the description does not need to repeat them; nothing essential is missing.

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?

Schema coverage is 100%, so the baseline is 3, but the description adds operational meaning beyond parameter names: query_variants is framed as the preferred way to get multiple retrieval angles, its batching/RRF/rerank behavior is described, and response_deadline_ms semantics are tied to QUERY_TIMEOUT and request_id. This is meaningful value on top of 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 names a specific verb and resource: searching local project knowledge, and immediately scopes it with 'LOCAL PROJECT KNOWLEDGE SEARCH ONLY.' It explicitly lists user intents that should route here (find, recall, inspect, search) and contrasts itself with external search tools, so an agent can distinguish it from siblings without ambiguity.

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?

It gives an explicit when-to-use rule ('Always use this tool when the user asks to find, recall, inspect, or search information already stored in project memory...') and an explicit exclusion ('Use search or search_parallel only when new external information is required'). It also instructs the agent to prefer query_variants over repeated calls and tells it not to auto-retry after degraded lanes.

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