Skip to content

Non-static classes and methods are not picked up by WithTools() #79

@GerbenAxendo

Description

@GerbenAxendo

Non-static classes and methods that are correctly decortated with the [McpToolType] and [McpTool] attribute classes are not picked up. The sample in AspNetCoreSseServer\Tools\SampleLlmTool doesn't seem to work because of this issue. The comment in this class noted "This tool uses depenency injection and async method" - suggesting support for non-static classes and methods.

To Reproduce
Steps to reproduce the behavior:

  1. Run AspNetCoreSseServer\Program.cs
  2. Use MCP Inspector (v0.6.0) against the localhost (transport type SSE)
  3. The tool "SampleLlmTool" is not display in the Tool list, even when Echo (the other sample) is.

Expected behavior
You would expect the tool SampleLLM to appear.

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions