Files
beaver_project/skills/officebench-mcp/versions/v0001/SKILL.md
steven_li 8aeb97a5fc feat(app): 移除内置agents并添加CORS支持和技能上传优化
移除了agents/registry.json中的所有内置agents配置,将agents数组清空。
为web应用添加了CORS中间件支持,允许指定的前端地址跨域访问。
重构了技能上传功能,增加了LLM重写机制,自动规范化上传的技能格式。
新增了工具名称提取逻辑,从技能正文中自动识别Required Tools段落。
更新了技能学习候选者和草稿的载荷结构,添加评估报告统计信息。
修改了意图路由技能的说明,改进任务状态管理逻辑。
2026-06-12 13:25:20 +08:00

253 lines
9.8 KiB
Markdown

---
name: officebench-mcp
description: Guidance for OfficeBench evaluation tasks. Use the registered mcp_officebench_* tools to inspect and edit OfficeBench files, spreadsheets, documents, emails, calendars, PDFs, and answer files.
tools:
- mcp_officebench_excel_read_file
- mcp_officebench_excel_set_cell
- mcp_officebench_excel_delete_cell
- mcp_officebench_excel_create_new_file
- mcp_officebench_excel_convert_to_pdf
- mcp_officebench_word_read_file
- mcp_officebench_word_write_to_file
- mcp_officebench_word_create_new_file
- mcp_officebench_word_convert_to_pdf
- mcp_officebench_email_list_emails
- mcp_officebench_email_read_email
- mcp_officebench_email_send_email
- mcp_officebench_calendar_create_event
- mcp_officebench_calendar_list_events
- mcp_officebench_calendar_delete_event
- mcp_officebench_pdf_read_file
- mcp_officebench_pdf_convert_to_word
- mcp_officebench_pdf_convert_to_image
- mcp_officebench_ocr_recognize_file
- mcp_officebench_shell_command
- mcp_officebench_shell_list_directory
- mcp_officebench_shell_read_file
- mcp_officebench_shell_write_file
- mcp_officebench_shell_copy_file
- mcp_officebench_system_finish_task
- mcp_officebench_system_get_status
- mcp_officebench_image_convert_to_pdf
always: True
---
# Officebench Mcp
## Overview
Guidance for OfficeBench evaluation tasks. Use the registered mcp_officebench_* tools to inspect and edit OfficeBench files, spreadsheets, documents, emails, calendars, PDFs, and answer files.
## When to Use
- Use when the task requires Officebench Mcp guidance.
## Required Tools
- `mcp_officebench_excel_read_file`
- `mcp_officebench_excel_set_cell`
- `mcp_officebench_excel_delete_cell`
- `mcp_officebench_excel_create_new_file`
- `mcp_officebench_excel_convert_to_pdf`
- `mcp_officebench_word_read_file`
- `mcp_officebench_word_write_to_file`
- `mcp_officebench_word_create_new_file`
- `mcp_officebench_word_convert_to_pdf`
- `mcp_officebench_email_list_emails`
- `mcp_officebench_email_read_email`
- `mcp_officebench_email_send_email`
- `mcp_officebench_calendar_create_event`
- `mcp_officebench_calendar_list_events`
- `mcp_officebench_calendar_delete_event`
- `mcp_officebench_pdf_read_file`
- `mcp_officebench_pdf_convert_to_word`
- `mcp_officebench_pdf_convert_to_image`
- `mcp_officebench_ocr_recognize_file`
- `mcp_officebench_shell_command`
- `mcp_officebench_shell_list_directory`
- `mcp_officebench_shell_read_file`
- `mcp_officebench_shell_write_file`
- `mcp_officebench_shell_copy_file`
- `mcp_officebench_system_finish_task`
- `mcp_officebench_system_get_status`
- `mcp_officebench_image_convert_to_pdf`
## Workflow
- Identify whether the user's request matches the skill's trigger conditions.
- Read the relevant source guidance below and apply only the steps that fit the current task.
- Use the required tools deliberately and keep tool output tied to the user's goal.
### Source Guidance
### OfficeBench MCP Skill
Use this skill for OfficeBench evaluation runs. OfficeBench task files live in the OfficeBench MCP server, not in Beaver's local filesystem. Complete the task by calling real `mcp_officebench_*` tools.
#### Critical Rules
1. Use actual Beaver tool calls only. Do not print XML, DSML, JSON, or markdown that describes a tool call.
2. Never invent tool names. If you need to find files, use `mcp_officebench_shell_list_directory` or `mcp_officebench_shell_command`.
3. Do not use Beaver local filesystem, local runtime, local terminal, or local code tools for OfficeBench files.
4. Paths are relative to `/testbed` in the OfficeBench MCP container, such as `data/score.xlsx`.
5. If the task context gives a `workspace_id`, pass that same `workspace_id` argument in every OfficeBench MCP tool call that supports it.
6. Inspect files before editing them.
7. Verify the requested output file or edited cell exists before finishing.
8. Finish every task with `mcp_officebench_system_finish_task`.
#### Tool Names And Use
##### Excel
Use these for `.xlsx` files:
- `mcp_officebench_excel_read_file`: read workbook sheets and cell values.
- Required: `file_path`
- Optional: `sheet_name`, `workspace_id`
- `mcp_officebench_excel_set_cell`: write one cell.
- Required: `file_path`, `row`, `col`, `value`
- Optional: `sheet_name`, `workspace_id`
- Rows and columns are 1-based.
- `mcp_officebench_excel_delete_cell`: clear one cell.
- Required: `file_path`, `row`, `col`
- Optional: `sheet_name`, `workspace_id`
- `mcp_officebench_excel_create_new_file`: create a workbook.
- Required: `file_path`
- Optional: `workspace_id`
- `mcp_officebench_excel_convert_to_pdf`: convert an Excel file to PDF.
- Required: `file_path`
- Optional: `workspace_id`
Typical Excel sequence:
1. Call `mcp_officebench_shell_list_directory` on `data`.
2. Call `mcp_officebench_excel_read_file` on the target workbook.
3. Identify the exact row and column.
4. Call `mcp_officebench_excel_set_cell`.
5. Read the workbook again or use status/listing to verify.
6. Call `mcp_officebench_system_finish_task`.
For the common task "change Bob's midterm1 score to 100 in score.xlsx", inspect `data/score.xlsx`, find Bob's row and the `midterm1` column, then call `mcp_officebench_excel_set_cell` with that row, that column, and value `100`.
##### Word
Use these for `.docx` files:
- `mcp_officebench_word_read_file`: read all paragraphs.
- Required: `file_path`
- Optional: `workspace_id`
- `mcp_officebench_word_write_to_file`: overwrite or append text.
- Required: `file_path`, `text`
- Optional: `append`, `workspace_id`
- `mcp_officebench_word_create_new_file`: create a new Word document.
- Required: `file_path`
- Optional: `workspace_id`
- `mcp_officebench_word_convert_to_pdf`: convert Word to PDF.
- Required: `file_path`
- Optional: `workspace_id`
Preserve exact spelling, capitalization, punctuation, and line order from source files.
##### Email
Use these for email tasks:
- `mcp_officebench_email_list_emails`: list available `.eml` messages.
- Optional: `folder`, `workspace_id`
- `mcp_officebench_email_read_email`: read one email.
- Required: `email_path`
- Optional: `workspace_id`
- `mcp_officebench_email_send_email`: create/send an email artifact.
- Required: `to`, `subject`, `body`
- Optional: `attachments`, `workspace_id`
For email-search tasks, final answers should use plain text with literal lines like `Subject: ...`. Do not add markdown labels.
##### Calendar
Use these for calendar `.ics` tasks:
- `mcp_officebench_calendar_list_events`: inspect calendar events.
- Optional: `calendar_path`, `workspace_id`
- `mcp_officebench_calendar_create_event`: create an event.
- Required fields depend on the task; include summary/title, start, end, and target calendar when needed.
- Optional: `workspace_id`
- `mcp_officebench_calendar_delete_event`: delete an event.
- Required fields depend on the task; inspect events first.
- Optional: `workspace_id`
Use the task's current date/time context when interpreting relative dates.
##### PDF, OCR, And Images
Use these for PDF/image tasks:
- `mcp_officebench_pdf_read_file`: extract text from a PDF.
- Required: `pdf_file_path`
- Optional: `workspace_id`
- `mcp_officebench_pdf_convert_to_word`: convert PDF to Word.
- Required: `pdf_file_path`
- Optional: `workspace_id`
- `mcp_officebench_pdf_convert_to_image`: convert one PDF page to an image.
- Required: `pdf_file_path`
- Optional: `page_number`, `dpi`, `workspace_id`
- `mcp_officebench_ocr_recognize_file`: OCR an image.
- Required: `image_path`
- Optional: `language`, `workspace_id`
- `mcp_officebench_image_convert_to_pdf`: convert image to PDF.
- Required: `image_path`
- Optional: `output_path`, `workspace_id`
For conversion tasks, create the exact requested filename and verify it exists.
##### Shell And System
Use these for safe file discovery and text files:
- `mcp_officebench_shell_list_directory`: list a directory.
- Optional: `path`, `workspace_id`
- `mcp_officebench_shell_read_file`: read text files such as `.txt`, `.csv`, `.json`, `.md`, `.xml`.
- Required: `file_path`
- Optional: `workspace_id`
- `mcp_officebench_shell_write_file`: write text files.
- Required: `file_path`, `content`
- Optional: `append`, `workspace_id`
- `mcp_officebench_shell_copy_file`: copy a file or directory.
- Required: `source`, `destination`
- Optional: `workspace_id`
- `mcp_officebench_shell_command`: run shell commands inside the OfficeBench MCP container.
- Required: `command`
- Optional: `workdir`, `workspace_id`
- `mcp_officebench_system_get_status`: inspect filesystem/git status.
- Optional: `workspace_id`
- `mcp_officebench_system_finish_task`: mark the task complete and optionally write an answer.
- Optional: `answer`, `workspace_id`
Prefer dedicated Office tools for Office documents. Use shell tools for listing directories, copying/renaming files, and reading/writing plain text.
#### Anti-Patterns
Do not do any of the following:
- Do not call `mcp_officebench_find_in_workspace`; that tool does not exist.
- Do not output `<tool_calls>`, `<invoke>`, DSML, or pseudo tool call text.
- Do not answer "done" without calling the required OfficeBench tools.
- Do not edit guessed paths without first listing or reading relevant files.
- Do not use `/testbed` as a literal prefix in path arguments unless a tool explicitly asks for an absolute path.
- Do not correct misspellings found in source data. Preserve source text exactly.
## Validation
- Verify the requested outcome with the most direct available check.
- Report any skipped step, unavailable dependency, or remaining uncertainty explicitly.
## Boundaries
- Do not broaden the task beyond the user's request.
- Do not use tools that are not listed or clearly available in the current runtime.
## Anti-Patterns
- Do not summarize the skill instead of applying it.
- Do not claim completion without validation evidence.