Sasha MCP reference

searchKnowledge

Search the knowledge base

Full-text search across the knowledge documents you can see (case-insensitive substring). Returns matching document paths with line numbers and snippets. Then use readDoc to read the full document. Optionally restrict to one project.

Arguments

ArgumentTypeRequiredDescription
querystringrequiredText to search for
projectstringoptionalOptional project id to restrict the search

Scopes

knowledge:read

Annotations

  • Read only: yes
  • Destructive: no

When to use

Use searchKnowledge to find which documents mention a subject. Then read the full document with readDoc.

The tool needs the knowledge:read scope.

  • The search is a plain, case-insensitive text match. It is not a semantic search. If you find nothing, try a few other words before you decide that the subject is not documented.
  • query must have at least 2 characters.
  • Without project, the search covers every project that this person can see. With project, it covers that project only.
  • It returns at most 40 results, and one result for each file: the first line that matches.
  • It skips files larger than 2 MB. It covers the same file types as listDocs.
  • Each path starts with the project id, for example northwind-advisory/pricing-policy.md. Pass that path to readDoc as it is, with no project. This differs from listDocs, whose paths have no project prefix.

A member searches their own home and each ordinary project where they hold a grant. Admin and staff search every active ordinary project, but no member home.

Example

{ "query": "maximum discount", "project": "northwind-advisory" }
{
  "query": "maximum discount",
  "results": [
    { "path": "northwind-advisory/2026-q2-pricing-review.md", "line": 20, "snippet": "2. The maximum discount stays at 10 per cent. Partners asked that every discount above 5 per cent is recorded in the proposal log with its reason." },
    { "path": "northwind-advisory/meetings/meeting-2026-08-14-pricing.md", "line": 9, "snippet": "Discussion: the commercial lead said the pricing policy sets the maximum discount at 10 per cent. Two partners said that the volume of work justifies more. One partner said a larger discount would set a precedent for other public-sector clients." },
    { "path": "northwind-advisory/pricing-policy.md", "line": 24, "snippet": "The maximum discount is 10 per cent of the fee. A discount needs a partner's approval. We give a discount only for one of these reasons:" }
  ],
  "truncated": false
}

When truncated is true, the search stopped at 40 results. Make the query narrower, or name a project.

Refusals and what to do

  • Error in searchKnowledge: Not found: the project you named does not exist, or this person cannot see it. Call listProjects and use an id from that list, or leave project out.
  • A query shorter than 2 characters is refused as invalid arguments.
  • If the connection does not hold knowledge:read, the tool is not in your tool list, and a call to it returns MCP error -32602: Tool searchKnowledge not found. Read the permissions section of getDocs. A scope is never added to an existing connection: the person must reconnect, or mint a new token, with knowledge:read.
  • An empty results list is not an error. Try other words.

Related

  • readDoc reads a document that the search found.
  • listProjects gives the project ids.
  • listDocs lists every document in one project.
  • getDocs has a limits section with the search limits.
made with bernard

Cookie settings