OpenAI has problems with the data returned by forgejo_mcp_server_version #74

Closed
opened 2026-02-18 13:46:50 +00:00 by a2800276 · 8 comments
a2800276 commented 2026-02-18 13:46:50 +00:00 (Migrated from codeberg.org)

Attempting to use this MCP server with GPT5.2 (and other OpenAI models) using copilot-cli, I receive the error:

CAPIError: 400 Invalid schema for function 'Codeberg-get_forgejo_mcp_server_version': In context=(), object schema missing properties.

The response to the intializing tools/list request does in fact return:

     (...)
{"annotations":
   { "readOnlyHint":false,
     "destructiveHint":true,
     "idempotentHint":false,
     "openWorldHint":true
   },
   "description":"Get MCP server version",
   "inputSchema":{
        "type":"object"
        // NO `properties` here
    },
   "name":"get_forgejo_mcp_server_version"
}
    (...)

To the best of my knowledge, JSON Schema doesn't require an unpopulated properties property, but OpenAI seems to expect it. Adding insult to injury, the root cause of this is not in the forgejo MCP project, but in the mcp-go dependency, namely here where the Properities are tagged with the omitempy designator for json serialization.

Attempting to use this MCP server with GPT5.2 (and other OpenAI models) using copilot-cli, I receive the error: ``` CAPIError: 400 Invalid schema for function 'Codeberg-get_forgejo_mcp_server_version': In context=(), object schema missing properties. ``` The response to the intializing `tools/list` request does in fact return: ``` (...) {"annotations": { "readOnlyHint":false, "destructiveHint":true, "idempotentHint":false, "openWorldHint":true }, "description":"Get MCP server version", "inputSchema":{ "type":"object" // NO `properties` here }, "name":"get_forgejo_mcp_server_version" } (...) ``` To the best of my knowledge, JSON Schema doesn't _require_ an unpopulated `properties` property, but OpenAI seems to expect it. Adding insult to injury, the root cause of this is not in the forgejo MCP project, but in the mcp-go dependency, namely [here](https://github.com/mark3labs/mcp-go/blob/0510f0cd95df11a8f96c49849d96bcf69a3b3464/mcp/tools.go#L665) where the `Properities` are tagged with the `omitempy` designator for json serialization.
goern commented 2026-02-18 13:53:05 +00:00 (Migrated from codeberg.org)

hey @a2800276 thanks for bringing this up.

any proposal? do I understand correctly, that it would be nice to have the properties populated by forgejo-mcp? what shall be the content?

hey @a2800276 thanks for bringing this up. any proposal? do I understand correctly, that it would be nice to have the properties populated by forgejo-mcp? what shall be the content?
a2800276 commented 2026-02-18 14:00:22 +00:00 (Migrated from codeberg.org)

what shall be the content?

presumably an empty { ... "properties":{} ... }

tbh: this is just something that came to my attention. The correct way to handle this would be to raise the issue with mcp-go and have them remove the omitempty. I can try to build a version of forgejo-mcp with a patched mcp-go to verify and then also raise the issue upstream.

There may be consequences to adding the empty properties to the InputSchema that I am not aware of though...

That seems like a lot of work though, and was not really what I had in mind opening this issue :) Not sure if anyone know the mcp-go maintainers? Otherwise: I'll have to see when I get around to it.

> what shall be the content? presumably an empty `{ ... "properties":{} ... }` tbh: this is just something that came to my attention. The correct way to handle this would be to raise the issue with `mcp-go` and have them remove the `omitempty`. I can try to build a version of forgejo-mcp with a patched mcp-go to verify and then also raise the issue upstream. There may be consequences to adding the empty `properties` to the InputSchema that I am not aware of though... That seems like a lot of work though, and was not really what I had in mind opening this issue :) Not sure if anyone know the mcp-go maintainers? Otherwise: I'll have to see when I get around to it.
goern commented 2026-02-18 14:10:39 +00:00 (Migrated from codeberg.org)

I dont know the mcp-go maintainers... I'd be happy if you contribute, but we can also keep this issue open for documentation purposes and leave the code as is. up to you ;)

I dont know the mcp-go maintainers... I'd be happy if you contribute, but we can also keep this issue open for documentation purposes and leave the code as is. up to you ;)
a2800276 commented 2026-02-18 17:34:56 +00:00 (Migrated from codeberg.org)

Actually, this turned out to be fairly easy to set up and test. And adding an empty "properties:{}" property does seem to solve the problem. I'll post this to the gh issues and submit a PR and will link & update this issue.

(Small world incidentally, I saw you're located in Bonn, I'm in Cologne :)

Actually, this turned out to be fairly easy to set up and test. And adding an empty "properties:{}" property does seem to solve the problem. I'll post this to the gh issues and submit a PR and will link & update this issue. (Small world incidentally, I saw you're located in Bonn, I'm in Cologne :)
a2800276 commented 2026-02-18 18:15:42 +00:00 (Migrated from codeberg.org)

Ok, I've submitted an issue and PR at the mcp-go github.

Ok, I've submitted an [issue](https://github.com/mark3labs/mcp-go/issues/719) and [PR](https://github.com/mark3labs/mcp-go/pull/720/changes) at the mcp-go github.
a2800276 commented 2026-02-18 18:52:03 +00:00 (Migrated from codeberg.org)

Urgh, bla.

They already fixed this 🫣

here's the fix to forgejo-mcp:

--- a/go.mod
+++ b/go.mod
@@ -4,10 +4,12 @@ go 1.25.0

 require (
        codeberg.org/mvdkleijn/forgejo-sdk/forgejo/v2 v2.2.0
-       github.com/mark3labs/mcp-go v0.43.2
+       github.com/mark3labs/mcp-go v0.44.0
        go.uber.org/zap v1.27.1
 )
Urgh, bla. They already fixed this 🫣 here's the fix to forgejo-mcp: ``` --- a/go.mod +++ b/go.mod @@ -4,10 +4,12 @@ go 1.25.0 require ( codeberg.org/mvdkleijn/forgejo-sdk/forgejo/v2 v2.2.0 - github.com/mark3labs/mcp-go v0.43.2 + github.com/mark3labs/mcp-go v0.44.0 go.uber.org/zap v1.27.1 ) ```
goern commented 2026-02-18 19:12:41 +00:00 (Migrated from codeberg.org)

duh 🤣

duh 🤣
jiriks74 commented 2026-03-12 18:19:48 +00:00 (Migrated from codeberg.org)

I just tested this by patching the mcp-go dependency to v0.44.0 and I can confirm that it's working.

I just tested this by patching the `mcp-go` dependency to `v0.44.0` and I can confirm that it's working.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
agentic-forges/forgejo-mcp#74
No description provided.