search_graph: clarify how to find a known symbol without specifying its label

Open Beginner friendly
#3,131 1 comment 1 reaction 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
1-3 hours
Newbie friendliness
82/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript
Domain
devtools

Research direction

Find the search_graph tool description and its documentation, then clarify the difference between BM25 query search and name_pattern lookup. Explain that unlabeled BM25 search excludes Variable nodes, and that literal names should use escaped, anchored patterns. Done when both the tool description and documentation explain these behaviors; the issue reports that an E2E test already verified structural search.

Written by the indexing model from the issue text.

Description

documentation enhancement parsing/quality ux/behavior
What problem does this solve?

The current search_graph tool description does not clearly explain when to use query versus name_pattern.

For example, given an indexed TypeScript declaration:

export const nativeScaleRefreshMarker = 913;

The following BM25 search does not return the declaration:

{
  "project": "<project>",
  "query": "nativeScaleRefreshMarker",
  "limit": 6,
  "format": "json"
}

This is intentional. BM25_UNLABELLED_EXCLUSION excludes Variable, File, Folder and Project nodes to prevent path matches from crowding out other definitions.

However, clients can already find a known symbol without knowing its label by using an anchored name_pattern and omitting query:

{
  "project": "<project>",
  "name_pattern": "^nativeScaleRefreshMarker$",
  "limit": 6,
  "format": "json"
}
Proposed solution

Update the search_graph tool description and documentation to explain that:

  • query uses BM25 full-text search. Without a label filter, Variable nodes are excluded.
  • name_pattern can locate known symbols without requiring their node label.
  • For literal symbol names, clients should escape regex metacharacters and use anchored patterns.

No changes to BM25 ranking, candidate selection or the database schema are needed.

Verification

A native E2E test confirmed that structural search finds both variable declarations in a repository containing 2,105 competing functions, without specifying a label or changing BM25 behavior.

Confirmations
  • I searched existing issues and this is not a duplicate.
Dominant language
C
Stars
45.8k
Forks
3.8k
Avg merge
2d 18h
Merged PRs (30d)
108

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from DeusData/codebase-memory-mcp

All issues in DeusData/codebase-memory-mcp

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.