Design principles for AI interaction with the Ghidra HTTP API
mainThe GhidraMCP Ghidra Plugin HTTP API v2 is designed specifically for consumption by AI agents. It follows several key principles to ensure reliable automation and discovery:
- Structured JSON Responses: All responses use a predictable JSON format to facilitate reliable parsing by AI agents.
- HATEOAS-driven Discovery: The API uses
_linksin responses, allowing AI agents to discover available actions and related resources dynamically without needing hardcoded paths. - Dual Addressing: Key entities like functions and symbols can be addressed using either their memory address or their name.
- Granular Operations: Operations such as decompilation, disassembly, and analysis are exposed as distinct, explicit endpoints.
- Scalable Data Handling: The API implements pagination and filtering to manage large datasets like symbols, functions, cross-references (xrefs), and disassembly.
- Actionable Error Reporting: Errors are explicitly signaled via
success: falseand include anerrorobject with details. - Raw Data Integrity: The API returns raw or structured Ghidra data rather than pre-summarized text, delegating the task of interpretation and summarization to the AI agent.