Getting AI_APICallError when using the Linear MCP server #967

Closed
opened 2026-02-16 17:28:56 -05:00 by yindo · 9 comments
Owner

Originally created by @torarvid on GitHub (Jul 29, 2025).

Originally assigned to: @thdxr on GitHub.

After setting up the Linear MCP server like so in opencode.json:

"mcp": {
    "linear": {
      "type": "local",
      "command": ["npx", "-y", "mcp-remote", "https://mcp.linear.app/sse"],
      "enabled": true
    }
}

I tried this in opencode (v0.3.80 on macOS):

tell me about linear ticket ABC-1234
torarvid (02:56 PM)

... and got this error:

AI_APICallError: * GenerateContentRequest.tools[0].function_declarations[19].parameters.properties[links].items.properties[url].format: only 'enum' and 'date-time' are supported for STRING type
* GenerateContentRequest.tools[0].function_declarations[20].parameters.properties[links].items.properties[url].format: only 'enum' and 'date-time' are supported for STRING type

I can't say for sure whether this is an opencode issue or Linear or something local to my machine, but the Linear MCP server does work when using gemini-cli.

Originally created by @torarvid on GitHub (Jul 29, 2025). Originally assigned to: @thdxr on GitHub. After setting up the Linear MCP server like so in opencode.json: ```json "mcp": { "linear": { "type": "local", "command": ["npx", "-y", "mcp-remote", "https://mcp.linear.app/sse"], "enabled": true } } ``` I tried this in `opencode` (v0.3.80 on macOS): ``` tell me about linear ticket ABC-1234 torarvid (02:56 PM) ``` ... and got this error: ``` AI_APICallError: * GenerateContentRequest.tools[0].function_declarations[19].parameters.properties[links].items.properties[url].format: only 'enum' and 'date-time' are supported for STRING type * GenerateContentRequest.tools[0].function_declarations[20].parameters.properties[links].items.properties[url].format: only 'enum' and 'date-time' are supported for STRING type ``` I can't say for sure whether this is an opencode issue or Linear or something local to my machine, but the Linear MCP server does work when using gemini-cli.
yindo closed this issue 2026-02-16 17:28:56 -05:00
Author
Owner

@thdxr commented on GitHub (Jul 29, 2025):

what model is this?

@thdxr commented on GitHub (Jul 29, 2025): what model is this?
Author
Owner

@rekram1-node commented on GitHub (Jul 30, 2025):

I also noticed this w/ gemini models I think gemini cli fixes it by sanitizing mcp server tools

@rekram1-node commented on GitHub (Jul 30, 2025): I also noticed this w/ gemini models I think gemini cli fixes it by sanitizing mcp server tools
Author
Owner

@torarvid commented on GitHub (Jul 30, 2025):

@thdxr oh yeah, sorry I forgot to add that: google/gemini-2.5-pro

@torarvid commented on GitHub (Jul 30, 2025): @thdxr oh yeah, sorry I forgot to add that: `google/gemini-2.5-pro`
Author
Owner

@torarvid commented on GitHub (Jul 30, 2025):

I noticed that if I look at the Linear MCP tools/list output in the mcp inspector, I see this:

Image

I'm on a bit of thin ice here, but feels like that path matches the path from the output in opencode, and there are 2 keys in the tools/list output that have this format: uri, just as in the error message.

@torarvid commented on GitHub (Jul 30, 2025): I noticed that if I look at the Linear MCP `tools/list` output in the mcp inspector, I see this: <img width="1754" height="2740" alt="Image" src="https://github.com/user-attachments/assets/42630841-2900-41c3-bb58-7fc0452d1a1b" /> I'm on a bit of thin ice here, but feels like that path matches the path from the output in opencode, and there are 2 keys in the tools/list output that have this `format: uri`, just as in the error message.
Author
Owner

@leeadkins commented on GitHub (Jul 31, 2025):

I think this PR is attempting to fix this, but it doesn't yet appear to limit format to the two types specified in the error message so it may still need another pass before it would solve this one.

https://github.com/sst/opencode/pull/1232

@leeadkins commented on GitHub (Jul 31, 2025): I think this PR is attempting to fix this, but it doesn't yet appear to limit `format` to the two types specified in the error message so it may still need another pass before it would solve this one. https://github.com/sst/opencode/pull/1232
Author
Owner

@necaris commented on GitHub (Aug 2, 2025):

@torarvid @thdxr Yes, #1232 should address this, although as hinted it might need another pass. It needs a rebase, anyway.

@necaris commented on GitHub (Aug 2, 2025): @torarvid @thdxr Yes, #1232 _should_ address this, although as hinted it might need another pass. It needs a rebase, anyway.
Author
Owner

@torarvid commented on GitHub (Sep 1, 2025):

Just noticed this seems to be fixed for me... Not sure when, but I have v0.5.29 now, and I no longer get the error. @rekram1-node, maybe you could try as well, and if it works, I can just close this.

@torarvid commented on GitHub (Sep 1, 2025): Just noticed this seems to be fixed for me... Not sure when, but I have v0.5.29 now, and I no longer get the error. @rekram1-node, maybe you could try as well, and if it works, I can just close this.
Author
Owner

@rekram1-node commented on GitHub (Sep 1, 2025):

thx for sharing @torarvid ill test it

@rekram1-node commented on GitHub (Sep 1, 2025): thx for sharing @torarvid ill test it
Author
Owner

@rekram1-node commented on GitHub (Sep 1, 2025):

yeah seems fixed thx for letting me know! closing

@rekram1-node commented on GitHub (Sep 1, 2025): yeah seems fixed thx for letting me know! closing
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#967