modelcontextprotocol / modelcontextprotocol/servers

sequentialthinking tool description beyond OpenAI length limitation

Open
#799 4 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
90.5k
Forks
11.7k
Avg merge
2d 2h
Merged PRs (30d)
5

Description

Describe the bug
The length of the description of the sequentialthinking server is longer than the max allowed length of tool descriptions when using some OpenAI models.

To Reproduce
Steps to reproduce the behavior:

  1. Pass the description of the sequentialthinking tool as part of a tool-enabled inference request to gpt4o-mini.

Expected behavior
No errors, and the LLM is able to use the sequentialthinking tool

Logs
In my case, I am using a client to send the completion requests, and that client uses the tool descriptions provided via the MCP server protocol to format the completion requests. When using sequentialthinking tool with gpt40-mini, due to the length of its description, errors happen such as:

- body: {
  "error": {
    "message": "Invalid 'tools[26].function.description': string too long. Expected a string with maximum length 1024, but got a string with length 2780 instead.",
    "type": "invalid_request_error",
    "param": "tools[26].function.description",
    "code": "string_above_max_length"
  }
}

I cannot find any official documentation of this limitation.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the sequentialthinking server's tool description and first reproduce the request failure with gpt4o-mini. Confirm the description exceeds the reported 1024-character limit, then verify that the adjusted description allows the tool-enabled request to succeed without errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
ai, api
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.