semantic_query

[semantic]

Runs compact read-only semantic query patterns for package imports, cross-project API usage, and symbols with references.

Why this tool exists

Package importer, API surface, and symbols-with-references questions are expensive to assemble manually.

How it helps the agent

The model gets compact, workflow-shaped evidence without repeated symbol searches and file reads.

Try it locally in the TGlider playground

Parameters

NameTypeRequiredDescription
patternstringYesQuery pattern: 'package_importers', 'project_exports_referenced_by_project', or 'symbols_with_references'.
packageNamestringNoPackage name for package importer queries.
projectNamestringNoOptional loaded project name to scope the query.
referencedByProjectNamestringNoProject that references another project API.
textstringNoOptional symbol name text filter.
kindstringNoOptional TypeScript symbol kind filter.
exportedOnlybooleanNoReturn only exported symbols where the pattern supports it.
surfacestringNoAPI surface for project export queries: 'entrypoints' or 'allExports'.
exportKindstringNoFilter exports by 'all', 'value', or 'type'.
includeTypeOnlybooleanNoInclude type-only imports and references where the pattern supports it.
includeReExportsbooleanNoInclude re-export relationships where the pattern supports it.
matchSubpathsbooleanNoMatch package subpath imports for package importer queries.
maxReferencesPerSymbolnumberNoMaximum references to include for each symbol result.
candidateLimitnumberNoMaximum candidate symbols to inspect before returning matches.
skipnumberNoNumber of matching results to skip.
takenumberNoMaximum number of matching results to return.

Examples

Find files importing a package

Request
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "semantic_query",
    "arguments": {
      "pattern": "package_importers",
      "packageName": "react"
    }
  }
}

Response Notes

Returns query-specific compact semantic evidence and next-tool hints.

↑/↓ NavigateEnter OpenSpace Expand