fix(mcp): active view metadata disagrees with the view list recommendation
Les mainteneurs répondent en général sous 2 jours
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 48/100
Piste de recherche
The report identifies bn_binary_view_list, bn_binary_view_get_active, and the view-selection reply as the affected entry points; it says their implementation ships inside the proprietary application. Start by tracing the public MCP tool declarations and any shared view metadata serialization in the repository. Done means the same unchanged active view has consistent recommendation metadata across all three replies, or the replies document distinct semantics without contradictory booleans.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Summary
For the same active Mach-O view with no intervening state change, bn_binary_view_list reports recommended: true, while bn_binary_view_get_active reports recommended: false. Clients therefore receive conflicting metadata for one view. The inconsistency also appears in the view-selection reply.
Steps to reproduce
- Save the C source below as
fixture.c, compile it, and openfixturein Binary Ninja. Enable and start the built-in GUI MCP server, then connect an MCP client and runtools/list.
#include <stdio.h>
volatile int fixture_global = 7;
__attribute__((noinline, used)) int fixture_leaf(int value) { puts("FIXTURE_LEAF"); return value + fixture_global; }
__attribute__((noinline, used)) int fixture_branch(int value) { return value > 3 ? fixture_leaf(value) : fixture_leaf(-value); }
int main(int argc, char **argv) { return fixture_branch(argc); }
clang -arch arm64 -O0 -g -fno-inline fixture.c -o fixture
-
Call
bn_binary_view_list, select the returned Mach-O view withbn_binary_view_set_active, and wait untilbn_analysis_statusreportsIdleState. Use the returned handle unchanged; handle values are session-scoped. -
Call
bn_binary_view_listand immediately callbn_binary_view_get_active, with no intervening tool call or GUI action. Comparerecommendedfor the same returned Mach-O view handle. Repeat the pair if desired. -
Inspect the
binaryViewobject returned by the view-selection call as well.
Expected behavior
The guide says to use the recommended field from the view list when choosing a view. When another tool returns the same named property on that same view, it should agree, or the contract should explicitly describe a different meaning or an unavailable value. The stable and default-branch guides describe no alternate meaning for the active-view property.
Actual behavior
Two consecutive list/get-active pairs reproduced the mismatch after analysis was idle. The following projection omits opaque handles; the handle and open-item identity matched across each pair.
| tool | viewType | created | active | available | recommended |
|---|---|---|---|---|---|
bn_binary_view_list |
Mach-O | true | true | true | true |
bn_binary_view_get_active |
Mach-O | true | true | true | false |
The get-active result carried recommended: false in both its JSON text and structuredContent.binaryView. The view-selection result also carried recommended: false. No view creation, analysis mutation, file switch, or GUI action occurred between each list/get-active pair. View selection and inspection still worked; no analysis failure was observed.
Evidence
- Expected source: The guide's “Handles” section directs clients to the list's
recommendedproperty; installed active-view tools return a same-named property on the same view object. Versioned guide links appear under Runtime or environment. - Failure source: Direct consecutive raw HTTP replies from the view-list and get-active tools, plus the earlier view-selection reply; relevant fields are projected above.
- Evidence provenance: observed
- Local verification: reproduced
- Reproduction completeness: complete
Restoration check
For one unchanged active view, compare the same view's recommendation across list, get-active, and set-active responses. The replies should agree on the recommendation, or explicitly represent and document any different semantics without presenting a contradictory boolean as the same metadata.
Runtime or environment
- Binary Ninja Version: Free 6.0.10905-Stable; bundle version
6.0.10905_free; built-in GUI HTTP MCP serverbinaryninja_ui_mcpversion0.1.0. - Edition: Free. OS: macOS 27.2; CPU architecture: arm64. Target: thin arm64 Mach-O built with the command above. Analysis status was
IdleStatebefore the observations. - The official stable release metadata matched the installed build. A fresh profile enabled
ui.mcp.enabled; no user plugins or existing databases were involved. The target was analyzed, never executed, and no database was saved. - The stable MCP guide and the current default-branch MCP guide were compared. Their relevant calling conventions agree. The implementation ships inside the proprietary application, so public default-branch source inspection does not verify its runtime behavior.
- The issue template requests development-build testing. That was not performed: Free cannot switch to the development channel. Personal/Commercial editions, development builds, Windows, and Linux are untested.
Triage assessment
- Impact level: P2
- Assessment status: supported
- Impact basis: The same view exposes contradictory selection metadata to MCP clients. The observed failure is bounded to metadata; view selection and function inspection succeeded.
- Workaround status: available
- Workaround basis: Use the list tool's recommendation as the guide instructs. That tool returned a usable Mach-O view and selecting it allowed successful inspection in this reproduction.
- Langage dominant
- C++
- Étoiles
- 1.3k
- Forks
- 304
- Merge moyen
- 2 j 20 h
- PR mergées (30 j)
- 10
Préparer son environnement
Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de Vector35/binaryninja-api
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 84/100
Vector35/binaryninja-api#8715 ·
Les mainteneurs répondent en général sous 2 jours
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Vector35/binaryninja-api#8714 ·
Les mainteneurs répondent en général sous 2 jours
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 85/100
Vector35/binaryninja-api#8713 ·
Les mainteneurs répondent en général sous 2 jours
-
Difficulté 1/5 1-3 heures Accessibilité débutants 78/100
Vector35/binaryninja-api#8689 ·
Les mainteneurs répondent en général sous 2 jours
-
Component: Python API
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
Vector35/binaryninja-api#8649 ·
Les mainteneurs répondent en général sous 2 jours
Toutes les issues de Vector35/binaryninja-api
Issues similaires
-
Bug Core VIF
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 80/100
ESPresense/ESPresense#2680 · 2 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 Moins d'une heure Accessibilité débutants 75/100
stew675/llama-cpp-rdna-boosts#348 ·
Les mainteneurs répondent en général sous 1 jour
-
Documentation: Add comprehensive newcomer onboarding guide, project structure, and local usage to READMEPeut-être pris @Ash-Blanc l’a pris aujourd’hui. Ouvertearea/other status/bot-triaged status/need-triage
Difficulté 2/5 Une demi-journée Accessibilité débutants 85/100
-
bug
Difficulté 1/5 Moins d'une heure Accessibilité débutants 85/100
Les mainteneurs répondent en général sous 1 jour