On this page

Context

search-code

Grep-like search over the project's ingested codebase. Needs the fabric:query.read grant.

curl -sS -X POST https://fabric.wexa.ai/mcp/$FABRIC_PROJECT_ID \
  -H "authorization: Bearer $FABRIC_API_KEY" \
  -H "Mcp-Session-Id: $MCP_SESSION_ID" \
  -H "content-type: application/json" -H "accept: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"search-code","arguments":{"query":"handler"}}}'
{
  "content": [
    {
      "type": "text",
      "text": "{\"lifecycle_id\":\"qlc_000165\",\"result\":{\"backend\":\"fulltext_unavailable\",\"count\":0,\"filtered_out\":0,\"hits\":[],\"note\":\"Use fetch-code with path + start_line/end_line (or row_pk) to load one span. Prefer search-code over query-context for code text.\"}}"
    }
  ],
  "isError": false
}

Parameters

ParameterTypeRequiredNotes
querystringRequiredSearch terms: a symbol, string or keywords. Must not be blank.
langstringOptionalLanguage filter, for example python or rust.
path_prefixstringOptionalPath prefix filter, for example src/.
limitintegerOptionalMax hits (default 25, max 50). A positive integer: zero, negative or non-numeric is refused.
Show full response

A real response, captured from a live call to search-code:

{
  "content": [
    {
      "type": "text",
      "text": "{\"lifecycle_id\":\"qlc_000165\",\"result\":{\"backend\":\"fulltext_unavailable\",\"count\":0,\"filtered_out\":0,\"hits\":[],\"note\":\"Use fetch-code with path + start_line/end_line (or row_pk) to load one span. Prefer search-code over query-context for code text.\"}}"
    }
  ],
  "isError": false
}
More details

backend: "fulltext_unavailable" means the project's code text indexes do not exist yet, which is the state of a project with no ingested codebase. The call degrades to an empty result (count: 0, no hits) instead of an error. Run code sync, then search again.

Full description from the tool, as the gateway advertises it:

Grep-like search over the project's ingested codebase (CodeChunk fulltext on the server). Use this for finding symbols, strings, and file text when you have no local repo access. Returns slim hits {path, start_line, end_line, preview, score}. Then call fetch-code for one span. Do NOT write Cypher / query-context for code text search.

It is not consequential, so it is never held for approval, and it is registered on every deployment, so it cannot be missing.

Not marked consequential: it is audited lightly and the project's write gate never holds it.

Every tool call works the same way: How every tool call works.