[GH-ISSUE #14256] tools #35042

Closed
opened 2026-04-22 19:10:10 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @remco-pc on GitHub (Feb 14, 2026).
Original GitHub issue: https://github.com/ollama/ollama/issues/14256

What is the issue?

when having this:

{
    "type": "function",
    "function": {
        "name": "directory_list",
        "description": "List a directory if it was ls",
    },
    "parameters": {
        "type": "object",
        "properties": {
            "directory": {
                "type": "string",
                "description": "A directory to list",
            },
        },
        "required": ["directory"],
    }
}

it seems to work but it cannot find its parameters with tool models.

but as the example stated and i try to do this:

{
    "type": "function",
    "function": {
        "name": "directory_list",
        "description": "List a directory if it was ls",
        "parameters": {
            "type": "object",
            "properties": {
                "directory": {
                    "type": "string",
                    "description": "A directory to list",
                }
            },
            "required": ["directory"],
        }
    }    
}

i get this error:
```bash
json: cannot unmarshal string into Go struct field ToolFunctionParameters.tools.function.parameters.properties of type api.ToolProperty"

Relevant log output


OS

WSL2

GPU

No response

CPU

Intel

Ollama version

0.16.1

Originally created by @remco-pc on GitHub (Feb 14, 2026). Original GitHub issue: https://github.com/ollama/ollama/issues/14256 ### What is the issue? when having this: ```javascript { "type": "function", "function": { "name": "directory_list", "description": "List a directory if it was ls", }, "parameters": { "type": "object", "properties": { "directory": { "type": "string", "description": "A directory to list", }, }, "required": ["directory"], } } ``` it seems to work but it cannot find its parameters with tool models. but as the example stated and i try to do this: ```javascript { "type": "function", "function": { "name": "directory_list", "description": "List a directory if it was ls", "parameters": { "type": "object", "properties": { "directory": { "type": "string", "description": "A directory to list", } }, "required": ["directory"], } } } i get this error: ```bash json: cannot unmarshal string into Go struct field ToolFunctionParameters.tools.function.parameters.properties of type api.ToolProperty" ``` ### Relevant log output ```shell ``` ### OS WSL2 ### GPU _No response_ ### CPU Intel ### Ollama version 0.16.1
GiteaMirror added the bug label 2026-04-22 19:10:10 -05:00
Author
Owner

@remco-pc commented on GitHub (Feb 15, 2026):

i found my problem to be that my system created an automated extra property which caused the problem, problem solved...

<!-- gh-comment-id:3904840766 --> @remco-pc commented on GitHub (Feb 15, 2026): i found my problem to be that my system created an automated extra property which caused the problem, problem solved...
Author
Owner

@cilquirm commented on GitHub (Apr 18, 2026):

How did you solve it? I am getting this error as well on a Mac mini with no obvious change made

<!-- gh-comment-id:4274217766 --> @cilquirm commented on GitHub (Apr 18, 2026): How did you solve it? I am getting this error as well on a Mac mini with no obvious change made
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#35042