Skip to main content
Glama
opensensor

Binary Ninja Cline MCP Server

by opensensor

get_binary_info

Extract metadata from binary files to analyze structure and properties for security research or reverse engineering purposes.

Instructions

Get binary metadata

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes

Implementation Reference

  • Primary handler for the get_binary_info MCP tool. Retrieves binary file information using BinaryNinjaHTTPClient.get_file_info and formats the response with key metadata like architecture, entry point, size, etc.
    elif method == "get_binary_info":
        path = params.get("path")
        if not path:
            return {"error": "Path parameter is required"}
            
        # We assume the binary is already loaded
        # Just log the path for debugging
        logger.info(f"Using binary: {path}")
            
        file_info = client.get_file_info(path)
        
        # Format the response to match the original API
        info = {
            "filename": file_info.get("filename", ""),
            "architecture": file_info.get("arch", {}).get("name", "unknown"),
            "platform": file_info.get("platform", {}).get("name", "unknown"),
            "entry_point": hex(file_info.get("entry_point", 0)),
            "file_size": file_info.get("file_size", 0),
            "is_executable": file_info.get("executable", False),
            "is_relocatable": file_info.get("relocatable", False),
            "address_size": file_info.get("address_size", 0)
        }
        return {"result": info}
  • Input schema definition for the get_binary_info tool in the list_tools response.
    {
        "name": "get_binary_info",
        "description": "Get information about a binary file",
        "inputSchema": {
            "type": "object",
            "properties": {
                "path": {
                    "type": "string",
                    "description": "Path to the binary file"
                }
            },
            "required": ["path"]
        }
  • Registration of get_binary_info tool in the call_tool handler, delegating to the method handler.
    if tool_name == "get_binary_info":
        return handle_request({
            "method": "get_binary_info",
            "params": tool_args
        }, client)
  • HTTP MCP server handler for get_binary_info, calls client.get_file_info(path) and wraps result.
    elif method == "get_binary_info":
        path = params.get("path")
        if not path:
            logger.error("Missing 'path' parameter")
            return self._error_response(request_id, -32602, "Missing 'path' parameter")
        if not isinstance(path, str):
            logger.error(f"Invalid path type: {type(path)}")
            return self._error_response(request_id, -32602, "Parameter 'path' must be a string")
        
        logger.debug(f"Getting info for file: {path}")
        info = self.client.get_file_info(path)
        return self._wrap_result(request_id, json.dumps(info, indent=2))
  • Input schema for get_binary_info in MCP_TOOLS array for HTTP server.
    "name": "get_binary_info",
    "description": "Get binary metadata",
    "streaming": False,
    "inputSchema": {
        "type": "object",
        "properties": {"path": {"type": "string"}},
        "required": ["path"]
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. 'Get binary metadata' implies a read-only operation, but it doesn't specify whether this requires file access permissions, what happens if the path is invalid, or if there are rate limits. For a tool with zero annotation coverage, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise with just three words, front-loaded with the core action. There's no wasted language, making it efficient for quick understanding, though this brevity contributes to gaps in other dimensions.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (a tool with one parameter but no schema descriptions or annotations) and lack of output schema, the description is incomplete. It doesn't explain what metadata is returned, error conditions, or usage context. For a tool in a server with sibling analysis tools, more detail is needed to ensure proper agent selection.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 0%, so the description must compensate for undocumented parameters. It mentions 'binary metadata' but doesn't explain the 'path' parameter's semantics, such as what format the path should be in (e.g., file path, URL) or what constitutes a valid binary. The description adds minimal value beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Get binary metadata' states a clear verb ('Get') and resource ('binary metadata'), but it's vague about what specific metadata is retrieved. It doesn't differentiate from sibling tools like 'list_functions' or 'disassemble_function', which might also provide metadata about binaries. The purpose is understandable but lacks specificity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives like 'list_functions' or 'disassemble_function'. The description doesn't mention prerequisites, exclusions, or context for usage. It's a basic statement of function without operational context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/opensensor/bn_cline_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server