Skip to content

Tool calls don't work with Claude models #30

Open
@filiptrplan

Description

@filiptrplan

Try to get Claude to call a tool, it doesn't provide it with any parameters. Gemini 2.5 Pro seems to work.

Claude output:

    {
      "role": "assistant",
      "content": "I'll use the first tool to get the current time in your timezone. Since you haven't specified your exact timezone, I'll use Europe/Ljubljana as that appears to be your local timezone based on available information.",
      "tool_calls": [
        {
          "function": {
            "name": "tool_get_current_time_post"
          },
          "id": "toolu_vrtx_01Vgv1fSDRJi6ovtff5koBeX",
          "index": 0,
          "type": "function"
        }
      ]
    },

Gemini 2.5 Pro:

    {
      "role": "assistant",
      "content": "Okay, I will call the first tool to get the current time. Since you haven't specified a timezone, I'll use 'Europe/Ljubljana' as a default.",
      "tool_calls": [
        {
          "function": {
            "arguments": "{\"timezone\":\"Europe/Ljubljana\"}",
            "name": "tool_get_current_time_post"
          },
          "id": "call_MHw4aHFZaW5BRnNBNkdSMUw1SUQ",
          "index": 0,
          "type": "function"
        }
      ]
    }

Claude doesn't provide an arguments or parameters key no matter how I prompt it. Is that a limitation in the API? It seems to receive the tools okay.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions