ollama/api
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
..
examples ci: restore previous linter rules (#13322) 2025-12-03 18:55:02 -08:00
client.go docs: fix link to modelfile.mdx (#13220) 2025-12-11 16:14:45 -08:00
client_test.go api/client: handle non-json streaming errors (#13007) 2025-12-01 15:10:16 -08:00
types.go cmd: add --tools flag for MCP server integration 2025-12-28 15:06:47 -08:00
types_test.go types: add nested property support for tool definitions (#13508) 2025-12-17 11:54:09 -08:00
types_typescript_test.go tools: support anyOf types 2025-08-05 16:46:24 -07:00