Skip to content

Conversation

@erdnj
Copy link

@erdnj erdnj commented Aug 9, 2025

Example call was resulting with an error on main branch.
With mapping in this PR, it has resolved.

Example call:

curl -sS http://127.0.0.1:3000/v1/messages \
  -H "Content-Type: application/json" \
  -H "anthropic-version: 2023-06-01" \
  -d '{
    "model": "claude-3.5-sonnet",
    "max_tokens": 200,
    "tools": [
      {
        "name": "get_course_outline",
        "description": "Get outline by course name",
        "input_schema": {
          "type": "object",
          "properties": { "course": { "type": "string" } },
          "required": ["course"]
        }
      }
    ],
    "messages": [
      { "role": "user", "content": "What is the outline of the MCP course?" },

      { "role": "assistant", "content": [
          { "type": "tool_use",
            "id": "TOOLUSEID",
            "name": "get_course_outline",
            "input": { "course": "MCP" }
          }
      ]},

      { "role": "user", "content": [
          { "type": "tool_result",
            "tool_use_id": "TOOLUSEID",
            "content": {
              "type": "json",
              "json": { "outline": ["Lesson 0 ...", "Lesson 1 ..."] }
            }
          }
      ]}
    ]
  }'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant