Find Symbols by Layer, Role or Domain
find_by_semanticsFind C# types and methods by resolved layer, role, domain, or responsibility; combine filters to answer which symbols match semantic criteria.
Instructions
Find types and methods by their resolved semantics: layer, role, domain, responsibility. Filters combine with AND, and each hit names where a matched value came from.
Use it for 'which types of layer X carry role Y?'. At least one filter is required.
layer and role match the WHOLE value, case-insensitively: role='View' is one view, not every ViewModel. Values that merely contain the query are counted in nearMisses (axis, value, symbols) and named in a leading 'note', never listed as matches. domain and responsibility are free text and match as a case-insensitive substring; responsibility exists on types only, so setting it matches no method. The echoed criteria show the mode ('role=View' vs 'domain~order').
Returns criteria, a 'note' when there are near misses, minConfidence, matches - at most 200 items (kind, name, declaringType, namespace, matched), types first - and when they apply availableAxisValues, unclassifiedAxes, verifiedAbsentAxes and nearMisses. matched lists per filtered axis the field, the value and its source: 'fact', 'ai', 'inferred' or 'none'.
The layer and role values the built-in inference assigns are listed on those parameters; there is no 'Repository' role and an enum gets none. A layer profile or an annotation adds values in its own spelling ('viewmodel-item' beside 'ViewModel'). Nothing infers a domain: that axis matches only where an annotation set one.
On zero matches availableAxisValues lists, for the queried axes, the values present under the same minConfidence (up to 50 per axis). A queried axis no symbol carries a value on at that confidence (so nothing can match it here) is in verifiedAbsentAxes when every symbol declares it 'none' via , otherwise (only some declare it, or no symbol does) in unclassifiedAxes. A queried value missing from availableAxisValues is unknown at that confidence; if it is listed there, the AND of your filters was empty. An axis you did not query is in no list.
Read-only; test-project symbols are matched like production ones.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"sessionId": "<sessionId>"
},
"name": "find_by_semantics"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| role | No | Match symbols whose resolved Role EQUALS this (whole value, case-insensitive). Inferred TYPE roles: Service, Helper, Model, Record, Interface, Builder, ViewModel, Converter, Controller, Middleware, Attribute, Exception, EntryPoint, ContractModel, Type - there is NO 'Repository' (a repository class is mostly 'Service'), and an enum gets no role. Methods use a category role (e.g. Query, Command, Mapping, Validation, Orchestration). <ai>-asserted roles add values of their own. Omit to not filter on role. | |
| layer | No | Match symbols whose resolved Layer EQUALS this (whole value, case-insensitive). The built-in inference assigns Domain / Application / Infrastructure / Presentation / Contracts; a layer profile adds its own names. Omit to not filter on layer. | |
| domain | No | Match symbols whose resolved Domain contains this (free text, set by an <ai> annotation - nothing infers it). Omit to not filter on domain. | |
| sessionId | Yes | The session_id returned by analyze_solution. Also takes an absolute .sln/.slnx/.slnf path, analyzed on first use. | |
| minConfidence | No | Confidence floor: 'any' (default - include inferred guesses) or 'asserted' (only fact/ai). Any other value is rejected (not silently treated as 'any'). | any |
| responsibility | No | Match TYPES whose resolved Responsibility contains this (types only; free text). Omit to not filter. |