Skip to main content
Glama
LZMW

Aurai Advisor (上级顾问 MCP)

by LZMW

consult_aurai

Get expert AI guidance for programming problems through multi-turn dialogue. Submit error details and code context to receive analysis and step-by-step solutions.

Instructions

请求上级AI的指导(支持交互对齐机制与多轮对话)

这是核心工具,当本地AI遇到编程问题时调用此工具获取上级AI的指导建议。


🔗 相关工具

  • sync_context:需要上传文档或代码时使用

    • 📄 上传文章、说明文档(.md/.txt)

    • 💻 上传代码文件(避免内容被截断) ⭐ 重要

    • .py/.js/.json 等代码文件复制为 .txt 后上传

  • report_progress:执行上级 AI 建议后,使用此工具报告进度并获取下一步指导

  • get_status:查看当前对话状态、迭代次数、配置信息

💡 重要提示:避免内容被截断

如果 code_snippetcontext 内容过长,请使用 sync_context 上传文件

# 步骤 1:将代码文件复制为 .txt
shutil.copy('script.py', 'script.txt')

# 步骤 2:上传文件
sync_context(operation='incremental', files=['script.txt'])

# 步骤 3:告诉上级顾问文件已上传
consult_aurai(
    error_message='请审查已上传的 script.txt 文件'
)

优势

  • ✅ 避免代码在 contextanswers_to_questions 字段中被截断

  • ✅ 利用文件读取机制,完整传递内容

  • ✅ 支持任意大小的代码文件


[重要] 何时开始新对话?

系统会自动检测,但你也可以手动控制:

  • 自动清空:当上一次对话返回 resolved=true 时,系统会自动清空历史

  • 手动清空:如果你要讨论一个完全不同的新问题,设置 is_new_question=true

何时设置 is_new_question=true

  • [OK] 切换到完全不相关的项目/文件

  • [OK] 之前的问题已解决,现在遇到全新的问题

  • [OK] 发现上下文混乱,想重新开始

  • [X] 不要在同一个问题的多轮对话中使用

交互协议

1. 多轮对齐机制

  • 不要期待一次成功:上级顾问可能会认为信息不足,返回反问问题

  • 仔细阅读 questions_to_answer 中的每个问题

  • 主动搜集信息(读取文件、检查日志、运行命令)

  • 再次调用 此工具,将答案填入 answers_to_questions 参数

2. 首次调用

必须提供:

  • problem_type:问题类型(runtime_error/syntax_error/design_issue/other)

  • error_message:清晰描述问题或错误

  • context:相关上下文(代码片段、环境信息、已尝试的方案)

  • code_snippet:相关代码(如果有)

3. 后续调用(当返回 status="need_info" 时)

必须提供:

  • answers_to_questions:对上级顾问反问的详细回答

  • 保持其他参数不变(除非有新信息)

4. 诚实原则

  • 禁止瞎编:如果不知道答案,诚实说明"未找到相关信息"

  • 禁止臆测:不要在没有证据的情况下假设解决方案

  • 提供具体证据(文件路径、日志内容、错误堆栈)

响应格式

信息不足时 (status="need_info")

{
  "status": "need_info",
  "questions_to_answer": ["问题1", "问题2"],
  "instruction": "请搜集信息并再次调用"
}

提供指导时 (status="success")

{
  "status": "success",
  "analysis": "问题分析",
  "guidance": "解决建议",
  "action_items": ["步骤1", "步骤2"],
  "resolved": false  // 是否已完全解决
}

问题解决后

resolved=true 时,对话历史会自动清空,下次查询将开始新对话。

[自动] 新对话检测

系统会自动检测新问题:

  • 如果上一次对话的 resolved=true,下次调用 consult_aurai 时会自动清空历史

  • 保证每个独立问题都有干净的上下文,避免干扰

[重要] 明确标注新问题(可选参数)

如果你想强制开始一个新对话,可以设置 is_new_question=true

  • 效果:立即清空所有之前的对话历史

  • 后果:上级AI将无法看到之前的任何上下文

  • 使用场景

    • 之前的对话已完全无关

    • 想重新开始讨论一个全新的问题

    • 发现上下文混乱,想重置

示例

# 第一次咨询(问题A)
consult_aurai(problem_type="runtime_error", error_message="...")

# 继续讨论问题A...
consult_aurai(answers_to_questions="...")

# 切换到问题B(标注为新问题,清空历史)
consult_aurai(
    problem_type="design_issue",
    error_message="...",
    is_new_question=True  # [注意] 会清空之前关于问题A的所有对话
)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
problem_typeYes问题类型: runtime_error, syntax_error, design_issue, other
error_messageYes错误描述
code_snippetNo相关代码片段
contextNo上下文信息(支持 JSON 字符串或字典,会自动解析)
attempts_madeNo已尝试的解决方案
answers_to_questionsNo对上级顾问反问的回答(仅在多轮对话时使用)
is_new_questionNo[重要] 是否为新问题(新问题会清空之前的所有对话历史,确保干净的上下文)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure and excels. It describes the multi-round interaction protocol (status='need_info' triggers follow-up calls), honest principle requirements (no fabrication), automatic history clearing when resolved=true, consequences of is_new_question (clears all prior context), and response formats. It adds rich context beyond what the input schema provides.

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

Conciseness3/5

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

The description is comprehensive but overly long and not front-loaded. While it contains valuable information, it includes extensive formatting (markdown, code blocks, emojis) and repetitive sections (e.g., multiple warnings about truncation, redundant explanations of is_new_question). Some content could be condensed without losing clarity, making it less efficient than ideal.

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

Completeness5/5

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

Given the tool's complexity (multi-round interaction, 7 parameters), no annotations, and the presence of an output schema, the description is exceptionally complete. It covers purpose, usage, behavioral protocols, parameter guidance, sibling tool relationships, and response handling. The output schema existence means return values needn't be explained, and the description fully compensates for the lack of annotations with detailed operational context.

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

Parameters4/5

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

The schema description coverage is 100%, so the baseline is 3. The description adds significant value by explaining parameter usage in context: it specifies which parameters are required for first calls (problem_type, error_message, context, code_snippet) vs. follow-up calls (answers_to_questions), provides examples for code_snippet/context handling with sync_context, and clarifies the impact of is_new_question. However, it doesn't add deep semantic nuance beyond the schema's descriptions for all parameters.

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

Purpose5/5

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

The description explicitly states the tool's purpose: '请求上级AI的指导' (request guidance from a higher-level AI) and '当本地AI遇到编程问题时调用此工具获取上级AI的指导建议' (call this tool when the local AI encounters programming problems to get guidance from a higher-level AI). It clearly distinguishes from siblings by explaining this is the '核心工具' (core tool) for obtaining AI guidance, while sibling tools handle context synchronization, progress reporting, and status checking.

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

Usage Guidelines5/5

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

The description provides extensive usage guidelines, including when to use this tool ('当本地AI遇到编程问题时'), when to use sibling tools instead (e.g., use sync_context for uploading files to avoid truncation, report_progress after executing suggestions), and explicit alternatives. It also details when to set parameters like is_new_question and provides scenarios for manual vs. automatic context clearing.

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/LZMW/mcp-aurai-server'

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