Skip to content

Commit 08b699e

Browse files
Add debug logging to listTools, listResources, listPrompts in connection_methods.go
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 87c2812 commit 08b699e

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

internal/mcp/connection_methods.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ func (c *Connection) callSDKMethod(method string, params interface{}) (*Response
3030
}
3131

3232
func (c *Connection) listTools() (*Response, error) {
33+
logConn.Printf("listTools: listing tools from serverID=%s", c.serverID)
3334
return listMCPItems(c, "tools",
3435
func(cursor string) (paginatedPage[*sdk.Tool], error) {
3536
result, err := c.getSDKSession().ListTools(c.ctx, &sdk.ListToolsParams{Cursor: cursor})
@@ -60,6 +61,7 @@ func (c *Connection) callTool(params interface{}) (*Response, error) {
6061
}
6162

6263
func (c *Connection) listResources() (*Response, error) {
64+
logConn.Printf("listResources: listing resources from serverID=%s", c.serverID)
6365
return listMCPItems(c, "resources",
6466
func(cursor string) (paginatedPage[*sdk.Resource], error) {
6567
result, err := c.getSDKSession().ListResources(c.ctx, &sdk.ListResourcesParams{Cursor: cursor})
@@ -87,6 +89,7 @@ func (c *Connection) readResource(params interface{}) (*Response, error) {
8789
}
8890

8991
func (c *Connection) listPrompts() (*Response, error) {
92+
logConn.Printf("listPrompts: listing prompts from serverID=%s", c.serverID)
9093
return listMCPItems(c, "prompts",
9194
func(cursor string) (paginatedPage[*sdk.Prompt], error) {
9295
result, err := c.getSDKSession().ListPrompts(c.ctx, &sdk.ListPromptsParams{Cursor: cursor})

0 commit comments

Comments
 (0)