roslyn:semantic_query
Query C# code semantically to find symbols using filters like accessibility, async status, attributes, and parameter types for precise code analysis.
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 |
|---|---|---|---|
| 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) | |
| namespaceFilter | No | Optional: filter by namespace (supports wildcards). Examples: 'MyApp.Core.*', '*.Services' | |
| accessibility | No | Optional: filter by accessibility. Values: Public, Private, Internal, Protected, ProtectedInternal, PrivateProtected | |
| isStatic | No | Optional: filter by static modifier (true for static, false for instance) | |
| type | No | Optional: filter fields/properties by their type. Partial match. Example: 'ILogger' finds all ILogger fields/properties | |
| returnType | No | Optional: filter methods by return type. Partial match. Example: 'Task' finds all methods returning Task | |
| attributes | No | Optional: filter by attributes (must have ALL specified). Example: ['ObsoleteAttribute', 'EditorBrowsableAttribute'] | |
| parameterIncludes | No | Optional: filter methods that MUST have these parameter types (partial match). Example: ['CancellationToken'] | |
| parameterExcludes | No | Optional: filter methods that must NOT have these parameter types (partial match). Example: ['CancellationToken'] | |
| maxResults | No | Maximum number of results (default: 100) |