[GH-ISSUE #5997] Tools documentation #29510

Closed
opened 2026-04-22 08:27:34 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @iplayfast on GitHub (Jul 26, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/5997

I like the new tools feature, however I can't find a list of what tools are known, other then the example code give. Can we add the list of known tools to the documentation?

Originally created by @iplayfast on GitHub (Jul 26, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/5997 I like the new tools feature, however I can't find a list of what tools are known, other then the example code give. Can we add the list of known tools to the documentation?
GiteaMirror added the feature request label 2026-04-22 08:27:35 -05:00
Author
Owner

@thinkverse commented on GitHub (Jul 26, 2024):

Ollama doesn't have tools only tool support. As the examples show, it's up to you to build the tools and implementation of those tools that the LLM will ultimately use.

<!-- gh-comment-id:2253565840 --> @thinkverse commented on GitHub (Jul 26, 2024): Ollama doesn't have tools only tool support. As the examples show, it's up to you to build the tools and implementation of those tools that the LLM will ultimately use.
Author
Owner

@duanshuaimin commented on GitHub (Jul 27, 2024):

@iplayfast the tools option helps you more convenient or without tools option you can use prompts like

{
"type": "function",
"function": {
"name": "get_stock_price",
"description": "Get the stock price of an array of stocks",
"parameters": {
"type": "object",
"properties": {
"names": {
"type": "array",
"items": {
"type": "string"
},
"description": "An array of stocks"
}
},
"required": [
"names"
]
}
}
}

<!-- gh-comment-id:2253699530 --> @duanshuaimin commented on GitHub (Jul 27, 2024): @iplayfast the tools option helps you more convenient or without tools option you can use prompts like { "type": "function", "function": { "name": "get_stock_price", "description": "Get the stock price of an array of stocks", "parameters": { "type": "object", "properties": { "names": { "type": "array", "items": { "type": "string" }, "description": "An array of stocks" } }, "required": [ "names" ] } } }
Author
Owner

@MarkWard0110 commented on GitHub (Jul 28, 2024):

The tool support provides the model with a list of tool functions it may "call." The model generates a response that contains the function request and the values for the parameters. The client that receives the response will parse the response and find the tool call. The client will then call the function with the requested parameters. The client then takes the response from the function call and adds a new message as role: tool and the tool's response as the content. Then sends the updated chat to the model. The model will read the response as it has received the tool execution results.

The client has to call the tools on-behalf of the Ollama model.

<!-- gh-comment-id:2254618558 --> @MarkWard0110 commented on GitHub (Jul 28, 2024): The tool support provides the model with a list of tool functions it may "call." The model generates a response that contains the function request and the values for the parameters. The client that receives the response will parse the response and find the tool call. The client will then call the function with the requested parameters. The client then takes the response from the function call and adds a new message as role: tool and the tool's response as the content. Then sends the updated chat to the model. The model will read the response as it has received the tool execution results. The client has to call the tools on-behalf of the Ollama model.
Author
Owner

@jeremedia commented on GitHub (Jul 31, 2024):

This initial confusion many have about tool calling is interesting. It's the result of such big weird new capacity for software: to have natural-language interface to your software's functionality.

@iplayfast, as @MarkWard0110 details above the model only selects a tool and provides the tool name and arguments (if any). Your software does the rest, including returning the output to model as a new "message" in the thread.

<!-- gh-comment-id:2259428946 --> @jeremedia commented on GitHub (Jul 31, 2024): This initial confusion many have about tool calling is interesting. It's the result of such big weird new capacity for software: to have natural-language interface to your software's functionality. @iplayfast, as @MarkWard0110 details above the model only selects a tool and provides the tool name and arguments (if any). Your software does the rest, including returning the output to model as a new "message" in the thread.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#29510