Integrate MCP servers with the ollama CLI and add route handlers for tool-enabled chat completions. CLI (cmd/cmd.go): - Add --tools flag to 'ollama run' command - Supports path argument: --tools /path/to/directory - Multi-round tool execution loop with result display - Displays available tools on startup Routes (server/routes.go, server/routes_tools.go): - MCP server handling in chat completions - /api/tools endpoint for tool listing - Session-based MCP manager lifecycle - Detailed documentation of MCP integration flow Parser (harmony/harmonyparser.go): - Handle embedded <think> segments in tool call responses - Extract tool calls from thinking model outputs Relates to #7865 |
||
|---|---|---|
| .. | ||
| examples | ||
| client.go | ||
| client_test.go | ||
| types.go | ||
| types_test.go | ||
| types_typescript_test.go | ||