Skip to main content
Glama

roslyn:semantic_query

Find C# symbols by semantic filters like async, accessibility, attributes, parameters, and more. Combines multiple filters with AND logic for precise results.

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

TableJSON Schema
NameRequiredDescriptionDefault
kindsNoOptional: filter by symbol kinds (can specify multiple). For types: Class, Interface, Struct, Enum, Delegate. For members: Method, Property, Field, Event. Example: ['Class', 'Interface']
isAsyncNoOptional: filter methods by async/await (true for async methods, false for sync methods)
namespaceFilterNoOptional: filter by namespace (supports wildcards). Examples: 'MyApp.Core.*', '*.Services'
accessibilityNoOptional: filter by accessibility. Values: Public, Private, Internal, Protected, ProtectedInternal, PrivateProtected
isStaticNoOptional: filter by static modifier (true for static, false for instance)
typeNoOptional: filter fields/properties by their type. Partial match. Example: 'ILogger' finds all ILogger fields/properties
returnTypeNoOptional: filter methods by return type. Partial match. Example: 'Task' finds all methods returning Task
attributesNoOptional: filter by attributes (must have ALL specified). Example: ['ObsoleteAttribute', 'EditorBrowsableAttribute']
parameterIncludesNoOptional: filter methods that MUST have these parameter types (partial match). Example: ['CancellationToken']
parameterExcludesNoOptional: filter methods that must NOT have these parameter types (partial match). Example: ['CancellationToken']
maxResultsNoMaximum number of results (default: 100)
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided. Description implies a read-only query but does not explicitly state safety, performance limits, or max results default. Adequate but could be more explicit.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Well-structured with intro, examples, and filter section. Somewhat verbose but efficient for the complexity. No unnecessary sentences.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 11 optional parameters and no output schema, the description provides examples and explains combining filters, which is sufficient for querying. Minor lack of return format details.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema covers all parameters (100%). Description adds value with examples and filter combination logic, though it doesn't deeply elaborate on edge cases. Above baseline.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool performs advanced semantic code querying with multiple filters, distinguishing it from simpler siblings like 'search_symbols' and 'get_symbol_info'. The examples solidify its purpose.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Examples and filter logic (AND) provide usage guidance, but there is no explicit comparison to alternatives or when not to use this tool. Slight gap given the many sibling tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/pzalutski-pixel/sharplens-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server