ida-api

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

IDA API Lookup

IDA API查询

Look up IDA SDK API documentation using the
ida-api-mcp
MCP tools. Operates in three modes depending on what the user asks for.
使用
ida-api-mcp
MCP工具查询IDA SDK API文档。根据用户的查询需求分为三种运行模式。

Mode 1: Named API lookup

模式1:指定名称API查询

When the user asks about a specific function, struct, or class by name:
get_api_doc("<name>")
Examples:
  • "what does
    get_func
    do?" →
    get_api_doc("get_func")
  • "tell me about
    xrefblk_t
    " →
    get_api_doc("xrefblk_t")
  • "what is
    cfunc_t
    ?" →
    get_api_doc("cfunc_t")
Then call
list_related_apis
to show what's commonly used alongside it:
list_related_apis("<name>")
Present results as:
  1. The API's signature, parameters, and return type
  2. A brief description of what it does
  3. Related APIs that are commonly used with it
当用户按名称查询特定函数、结构体或类时:
get_api_doc("<name>")
示例:
  • "
    get_func
    的作用是什么?" →
    get_api_doc("get_func")
  • "介绍一下
    xrefblk_t
    " →
    get_api_doc("xrefblk_t")
  • "
    cfunc_t
    是什么?" →
    get_api_doc("cfunc_t")
然后调用
list_related_apis
展示通常与之搭配使用的内容:
list_related_apis("<name>")
结果呈现格式如下:
  1. API的签名、参数和返回类型
  2. 其功能的简要描述
  3. 通常与之搭配使用的相关API

Mode 2: Related APIs

模式2:相关API查询

When the user asks "what APIs are related to X" or "what else do I need with X":
list_related_apis("<name>")
Then call
get_api_doc
on the top results to provide full details.
当用户询问“哪些API与X相关”或“使用X我还需要哪些其他内容”时:
list_related_apis("<name>")
然后对排名靠前的结果调用
get_api_doc
来提供完整详情。

Mode 3: Task-based search

模式3:基于任务的搜索

When the user describes a task rather than naming a specific API:
get_workflows("<task description>")
Then call
get_api_doc
on each API in the returned workflow to provide full documentation.
Examples:
  • "how do I iterate segments?" →
    get_workflows("iterate over segments")
  • "how to get imports?" →
    get_workflows("enumerate file imports")
Present results as:
  1. The recommended call sequence with data-flow dependencies
  2. Brief docs for each API in the sequence
  3. Source file where the pattern was found
当用户描述任务而非指定具体API名称时:
get_workflows("<task description>")
然后对返回的工作流中的每个API调用
get_api_doc
来提供完整文档。
示例:
  • "如何遍历段?" →
    get_workflows("iterate over segments")
  • "如何获取导入表?" →
    get_workflows("enumerate file imports")
结果呈现格式如下:
  1. 带有数据流依赖关系的推荐调用序列
  2. 序列中每个API的简要文档
  3. 该模式被发现的源文件