ollama/cmd
code4me2 abcb81bb07 cmd: add --tools flag for MCP server integration
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
2025-12-28 15:06:47 -08:00
..
bench cmd/bench: fix binary name in README (#13276) 2025-12-10 14:16:58 -08:00
runner Runner for Ollama engine 2025-02-13 17:09:26 -08:00
cmd.go cmd: add --tools flag for MCP server integration 2025-12-28 15:06:47 -08:00
cmd_test.go add REQUIRES command to Modelfile (#13361) 2025-12-18 13:21:29 -08:00
interactive.go bugfix: restore the current runOptions if loading fails in the CLI (#12402) 2025-09-25 18:30:45 -07:00
interactive_test.go server: add webp image input support (#10653) 2025-05-12 20:41:42 -07:00
start.go nolintlint 2024-06-04 11:13:30 -07:00
start_darwin.go mac: handle "keep" named apps (#11031) 2025-06-09 16:29:57 -07:00
start_default.go lint 2024-08-01 17:06:06 -07:00
start_windows.go spawn desktop quickly (#11011) 2025-06-08 09:34:52 -07:00
warn_thinking_test.go add thinking support to the api and cli (#10584) 2025-05-28 19:38:52 -07:00