diff options
Diffstat (limited to 'internal/mcp')
| -rw-r--r-- | internal/mcp/handlers_prompt.go | 2 | ||||
| -rw-r--r-- | internal/mcp/handlers_prompt_test.go | 2 | ||||
| -rw-r--r-- | internal/mcp/handlers_tool.go | 2 | ||||
| -rw-r--r-- | internal/mcp/handlers_tool_test.go | 2 | ||||
| -rw-r--r-- | internal/mcp/server.go | 2 | ||||
| -rw-r--r-- | internal/mcp/server_test.go | 12 | ||||
| -rw-r--r-- | internal/mcp/transport.go | 2 | ||||
| -rw-r--r-- | internal/mcp/types.go | 2 |
8 files changed, 13 insertions, 13 deletions
diff --git a/internal/mcp/handlers_prompt.go b/internal/mcp/handlers_prompt.go index cfe3385..2819a09 100644 --- a/internal/mcp/handlers_prompt.go +++ b/internal/mcp/handlers_prompt.go @@ -1,4 +1,4 @@ -// Summary: MCP prompt-related handler methods for list, get, create, update, and delete operations. +// MCP prompt-related handler methods for list, get, create, update, and delete operations. package mcp import ( diff --git a/internal/mcp/handlers_prompt_test.go b/internal/mcp/handlers_prompt_test.go index ad0d261..17b0607 100644 --- a/internal/mcp/handlers_prompt_test.go +++ b/internal/mcp/handlers_prompt_test.go @@ -1,4 +1,4 @@ -// Summary: Tests for MCP prompt management handlers (create, update, delete, get, list) +// Tests for MCP prompt management handlers (create, update, delete, get, list). package mcp import ( diff --git a/internal/mcp/handlers_tool.go b/internal/mcp/handlers_tool.go index 759de9e..de09a85 100644 --- a/internal/mcp/handlers_tool.go +++ b/internal/mcp/handlers_tool.go @@ -1,4 +1,4 @@ -// Summary: MCP tool-related handler methods for listing tools, calling tools, +// MCP tool-related handler methods for listing tools, calling tools, // and JSON Schema definitions for tool inputs. package mcp diff --git a/internal/mcp/handlers_tool_test.go b/internal/mcp/handlers_tool_test.go index 604938a..1d716ae 100644 --- a/internal/mcp/handlers_tool_test.go +++ b/internal/mcp/handlers_tool_test.go @@ -1,4 +1,4 @@ -// Summary: Tests for MCP tool handlers (tools/list, tools/call for create/update/delete) +// Tests for MCP tool handlers (tools/list, tools/call for create/update/delete). package mcp import ( diff --git a/internal/mcp/server.go b/internal/mcp/server.go index 99cd456..645c0cf 100644 --- a/internal/mcp/server.go +++ b/internal/mcp/server.go @@ -1,4 +1,4 @@ -// Summary: MCP server core — struct definition, constructor, main loop, and message dispatch. +// Package mcp provides the MCP server core — struct definition, constructor, main loop, and message dispatch. package mcp import ( diff --git a/internal/mcp/server_test.go b/internal/mcp/server_test.go index 8e3d7b5..256b324 100644 --- a/internal/mcp/server_test.go +++ b/internal/mcp/server_test.go @@ -1,4 +1,4 @@ -// Summary: Tests for MCP server operations +// Tests for MCP server operations. package mcp import ( @@ -85,27 +85,27 @@ func readResponse(r io.Reader) (*Response, error) { if len(lines) == 0 { return nil, fmt.Errorf("no response data") } - + // Try to find a response (message with an ID) for _, line := range lines { if len(line) == 0 { continue } - + // Quick check if this might be a response (has "id" field) if !strings.Contains(line, `"id"`) { continue // Skip notifications } - + var resp Response if err := json.Unmarshal([]byte(line), &resp); err != nil { continue // Not a valid response, try next line } - + // Valid response found return &resp, nil } - + return nil, fmt.Errorf("no response found in output (only notifications)") } diff --git a/internal/mcp/transport.go b/internal/mcp/transport.go index 9147ea0..5119d2c 100644 --- a/internal/mcp/transport.go +++ b/internal/mcp/transport.go @@ -1,4 +1,4 @@ -// Summary: MCP transport utilities for reading and writing JSON-RPC messages +// MCP transport utilities for reading and writing JSON-RPC messages // using newline-delimited JSON (JSONL) as required by the MCP stdio protocol. package mcp diff --git a/internal/mcp/types.go b/internal/mcp/types.go index 1b11200..9a0aa14 100644 --- a/internal/mcp/types.go +++ b/internal/mcp/types.go @@ -1,4 +1,4 @@ -// Summary: MCP protocol types for JSON-RPC 2.0 messages and MCP-specific structures. +// MCP protocol types for JSON-RPC 2.0 messages and MCP-specific structures. package mcp import "encoding/json" |
