roslyn:semantic_query
Query .NET code to find symbols by semantic properties using filters like kind, accessibility, attributes, async, static, parameters, and namespace. Returns symbol details with locations.
Instructions
Advanced semantic code query with multiple filters. Find symbols based on their semantic properties.
EXAMPLES:
Async methods without CancellationToken: isAsync=true, parameterExcludes=["CancellationToken"]
Public static methods: accessibility="Public", isStatic=true
Classes with [Obsolete]: kinds=["Class"], attributes=["ObsoleteAttribute"]
FILTERS: All specified filters are combined with AND logic. Omit a filter to skip it. Returns symbol details with locations.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | Optional: filter fields/properties by their type. Partial match. Example: 'ILogger' finds all ILogger fields/properties | |
| kinds | No | Optional: filter by symbol kinds (can specify multiple). For types: Class, Interface, Struct, Enum, Delegate. For members: Method, Property, Field, Event. Example: ['Class', 'Interface'] | |
| isAsync | No | Optional: filter methods by async/await (true for async methods, false for sync methods) | |
| isStatic | No | Optional: filter by static modifier (true for static, false for instance) | |
| attributes | No | Optional: filter by attributes (must have ALL specified). Example: ['ObsoleteAttribute', 'EditorBrowsableAttribute'] | |
| maxResults | No | Maximum number of results (default: 100) | |
| returnType | No | Optional: filter methods by return type. Partial match. Example: 'Task' finds all methods returning Task | |
| accessibility | No | Optional: filter by accessibility. Values: Public, Private, Internal, Protected, ProtectedInternal, PrivateProtected | |
| namespaceFilter | No | Optional: filter by namespace (supports wildcards). Examples: 'MyApp.Core.*', '*.Services' | |
| parameterExcludes | No | Optional: filter methods that must NOT have these parameter types (partial match). Example: ['CancellationToken'] | |
| parameterIncludes | No | Optional: filter methods that MUST have these parameter types (partial match). Example: ['CancellationToken'] |