Skip to main content
Glama

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

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?

With no annotations provided, the description carries the full burden of behavioral disclosure. It adds useful context about filter logic (AND combination, optional filters) and output ('Returns symbol details with locations'), but it does not cover important aspects like whether this is a read-only operation, potential performance impacts, error conditions, or pagination behavior. The description is informative but incomplete for a complex query tool.

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

Conciseness5/5

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

The description is well-structured and front-loaded with the core purpose, followed by examples and filter logic, ending with return details. Every sentence earns its place by providing essential information without redundancy, making it efficient and easy to scan.

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

Completeness3/5

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

Given the tool's complexity (11 parameters, no annotations, no output schema), the description is adequate but has gaps. It covers purpose, usage examples, and filter logic, but lacks details on output format beyond 'symbol details with locations', error handling, performance considerations, or how it differs from sibling tools like 'search_symbols'. For a semantic query tool, more behavioral context would be beneficial.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents all 11 parameters thoroughly. The description adds minimal value beyond the schema by providing examples that illustrate parameter usage (e.g., 'isAsync=true, parameterExcludes=["CancellationToken"]'), but it does not explain parameter interactions or add significant semantic depth. Baseline 3 is appropriate when the schema does the heavy lifting.

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's purpose as 'Advanced semantic code query with multiple filters' and specifies it 'Find symbols based on their semantic properties.' This is a specific verb+resource combination that distinguishes it from sibling tools like 'search_symbols' (which appears to be a simpler search) and other analysis/refactoring tools in the list.

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

Usage Guidelines4/5

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

The description provides clear context through examples that illustrate when to use this tool (e.g., 'Async methods without CancellationToken'), and it explains filter logic ('All specified filters are combined with AND logic. Omit a filter to skip it.'). However, it does not explicitly state when NOT to use it or name alternatives among siblings, such as 'search_symbols', for simpler queries.

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