()
| 161 | type ReadMCPResourceInput struct { |
| 162 | ServerName string `json:"server_name" jsonschema:"description=MCP server name"` |
| 163 | URI string `json:"uri" jsonschema:"description=Resource URI to read"` |
| 164 | } |
| 165 | |
| 166 | type ReadMCPResourceTool struct{ BaseTool } |
| 167 | |
| 168 | func NewReadMCPResourceTool() *ReadMCPResourceTool { |
| 169 | return &ReadMCPResourceTool{BaseTool{Spec: ToolSpec{ |
| 170 | Name: "mcp_read_resource", |
| 171 | Description: "Read the content of a specific MCP resource by its URI. Use mcp_list_resources first to discover available resources, then use this tool to fetch the content of one you need.", |
| 172 | InputPrototype: ReadMCPResourceInput{}, |
| 173 | Aliases: []string{"read_mcp_resource"}, |
| 174 | ReadOnly: BoolPtr(true), |
| 175 | ConcurrencySafe: BoolPtr(true), |
| 176 | Destructive: BoolPtr(false), |
| 177 | ShouldDefer: true, |
| 178 | SearchHint: "mcp resource read fetch uri", |
no test coverage detected