权限范围、工具与资源参考
每条 JointTex MCP 连接都绑定明确的 Scope 列表与(针对项目级 Scope 的)授权项目列表。建议从只读权限起步,需要修改时再通过账号设置里的 编辑访问权限 按需开启。
权限 Scope 全表
Section titled “权限 Scope 全表”写权限会自动附带对应的读依赖(compile:run 也会附带 files:read,因为编译日志与 Typst 自省查询可能输出项目源码内容)。
| Scope | 自动包含依赖 | 用途 |
|---|---|---|
projects:read |
— | 列出项目、查看项目上下文、搜索与查看公开模板库。 |
projects:create |
projects:read |
创建空白/模板项目,以及申请整包 ZIP 导入链接。 |
projects:organize |
projects:read、collections:read |
将已选项目归类到个人合集。 |
projects:archive |
projects:read |
将项目移入或移出个人归档。 |
projects:trash |
projects:read |
将自己拥有的项目移入回收站或恢复(影响所有协作者)。 |
collections:read |
— | 查看个人合集目录树(账号级)。 |
collections:write |
collections:read |
创建、修改或删除合集(账号级;删除合集保留其中的项目)。 |
members:invite |
projects:read |
通过邮箱邀请协作者加入自己拥有的项目。 |
files:read |
— | 列目录、搜索、读文本/PDF/图片/draw.io、列沙箱可用字体、获取文件/PDF/ZIP 下载链接、读历史版本与项目检查。 |
files:write |
files:read |
新建、编辑、上传、复制、移动、删除文件(全部进入修订追踪)、恢复历史版本以及修改编译设置。 |
review:decide |
files:read |
接受或拒绝待审修订。 |
compile:run |
files:read |
同步或后台异步编译、读编译日志、运行 typst_query/typst_eval,以及导出 Word/Markdown/HTML/arXiv 包。 |
comments:read |
— | 读取项目中的审阅评论串。 |
comments:write |
comments:read |
发起锚定评论、回复、解决/重开评论,以及删除由本连接发起的评论串。 |
templates:publish |
projects:read |
将自己拥有且可编译的项目发布到公开模板库。 |
account:read |
— | 查看账号配置概览(套餐、已绑定服务、令牌数量,绝不暴露密钥)。 |
notes:read |
— | 列出、搜索与阅读私人笔记(账号级)。 |
notes:write |
notes:read |
创建、编辑、移动与删除私人笔记(账号级,直接保存不进入项目修订追踪)。 |
memory:read |
— | 读取账号级 Agent 记忆。 |
memory:write |
memory:read |
保存、更新与删除账号级 Agent 记忆。 |
references:read |
— | 检索个人文献库、已连接的 Zotero 文库、在线 bib_lookup,以及(配合 files:read)授权项目的 .bib 文件。 |
核心工具分组
Section titled “核心工具分组”实时连接后可调用 get_capabilities 获取最新目录版本和完整 schema。主要工具分组如下:
- 发现与项目:
get_capabilities、list_projects、get_project_context、create_project、invite_member、search_templates、get_template、publish_template、read_account_setup、search_help、read_help。 - 组织与归档:
list_collections、create_collection、update_collection、delete_collection、get_project_collections、add_projects_to_collection、remove_projects_from_collection、move_projects_to_collection、set_project_collections、archive_project、unarchive_project、trash_project、restore_project。 - 读取与分析:
list_files、read_file、grep、read_project_index、run_project_checks、word_count、read_image、read_drawio、list_fonts、list_versions、diff_version。 - 编辑与审阅(修订追踪):
write_file(需传expected_version)、write_files(多文件原子写入)、edit_file(基于old_string锚定)、multi_edit(单文件多处原子编辑)、create_file、upload_file、copy_path、move_path、rename_file、delete_path、restore_file、read_changes、accept_changes、reject_changes。 - 编译、SyncTeX 与 Typst:
compile(同步编译)、start_compile/get_compile_job/cancel_compile_job(支持request_id的后台长编译)、read_compile_log、update_compile_settings、read_pdf(支持pages: "1-8"、include_image: true、contact_sheet: true拼图)、search_pdf、source_to_pdf、pdf_to_source、typst_query、typst_eval、export_project。 - 大文件与整包传输:
get_project_import_link、get_upload_link、get_upload_links、get_project_archive_link、get_file_link、get_pdf_link。 - 评论、笔记、记忆与文献:
read_comments、add_comment、reply_comment、resolve_comment、delete_comment;list_notes、search_notes、read_note、write_note、edit_note;list_memories、save_memory、update_memory、delete_memory;search_references、search_zotero、bib_lookup。
资源(Resources)与内置提示词(Prompts)
Section titled “资源(Resources)与内置提示词(Prompts)”- Resources:
jointtex://projects— 以静态 MCP 资源读取可访问项目列表;jointtex://projects/{project_id}/files/{+path}— 按资源 URI 读取项目文件(支持多级目录路径);jointtex://projects/{project_id}/compile-log— 读取最近一次编译日志。
- Prompts:
fix_compile_errors、review_changes、proofread_file。
结构化错误与幂等机制
Section titled “结构化错误与幂等机制”调用失败时,MCP 返回 isError: true 与机器可读的 structuredContent.error:
{ "error": { "code": "stale_version", "message": "File changed since expected_version", "retry_after_ms": 2000 }}请始终根据 error.code 分支处理,而不是解析报错文案:
stale_version/anchor_not_found:根据返回的changed_lines或closest行列定位重读对应片段后再重算编辑;project_not_authorized/insufficient_scope:引导用户前往返回的settings_url调整项目或权限;request_id幂等:支持request_idUUID 的写操作与后台编译会保留回执,网络中断后用相同request_id重试即可取回原结果,不会重复执行。
