Skip to content

set_function_prototype always fails, loses prototype parameter #75

Description

@laanwj

set_function_prototype MCP tool does not work. The Binary Ninja plugin server receives HTTP requests without the prototype query parameter, even though the MCP call provides it.

MCP tool invocation (what we send):

{
  "name_or_address": "TIMERA_BaseInit_packed",
  "prototype": "int32_t TIMERA_BaseInit_packed(void* timer, void const* cfg)"
}

Expected HTTP request:

GET /setFunctionPrototype?prototype=int32_t%20TIMERA_BaseInit_packed(void*%20timer%2C%20void%20const*%20cfg)&name=TIMERA_BaseInit_packed

Actual HTTP request:

"GET /setFunctionPrototype?name=TIMERA_BaseInit_packed HTTP/1.1" 400 -

It misses the prototype parameter, resulting in t always returns 400. This may be an escaping issue at some level of the stack causing the parameter to be ignored, i'm not sure. It does happen even with simple prototypes like void x(void). The other MCP tools provided by binary ninja seem to work fine.

This is with opencode and Deepseek V4 Pro (though i'm not sure that matters).

Edit: i've narrowed it down to a problem in the Axios dependency. Axios 1.13.2 includes prototype in the URL, but Axios 1.16.0 drops it. So it appears there's been a regression there.

Activity

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

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