Add read-only txAdmin status and resource list tools

未關閉
#57 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
42/100
Issue 類型
功能
描述清晰度
基本清楚
活躍度
活躍
技術堆疊
python
領域
devtools

研究方向

Start in mcp-server/tools/txadmin_client.py (TxAdminClient.request) and mcp-server/tools/txadmin.py, where txadmin_resource_control only renders txAdmin's toast. Confirm which panel endpoints return server status and resource states, then add read-only tools registered in mcp-server/server.py. Done means both tools return state without side effects and are covered by tests against a fake local panel, with endpoints documented in skills/txadmin-integration/SKILL.md.

由索引模型根據 Issue 內容生成。

描述

enhancement severity: medium

Summary

Every txAdmin tool except player search is a write action, and none can report state afterwards. Add read-only tools for server status and the resource list so the agent can confirm that a restart or ensure actually worked.

Where

  • mcp-server/tools/txadmin.py:39-60 (txadmin_server_control)
  • mcp-server/tools/txadmin.py:63-90 (txadmin_resource_control, fallback "command sent")
  • mcp-server/tools/txadmin_client.py:156-166 (TxAdminClient.request)
  • mcp-server/server.py:139-200 (txAdmin tool registrations)

Details

txadmin_resource_control POSTs /fxserver/commands and renders only txAdmin's toast, falling back to Resource '<name>' <action> command sent.. Nothing reports whether the server is online, starting or crashed, which resources are started, or whether a resource failed with a script error.

Impact

After "restart my resource", the agent cannot tell whether the resource came up, which is the core of the edit, restart, verify loop the txAdmin integration exists for.

Suggested fix

  • Add txadmin_status_tool (server status and uptime) and txadmin_resource_list_tool(filter) returning resource names and states, using txAdmin's existing panel endpoints. Open question: confirm which endpoints and payloads are stable across txAdmin versions.
  • Optionally let txadmin_resource_control poll the resource state after the command and report "started" or "failed".
  • Mark both new tools as read-only for MCP clients.

Acceptance criteria

  • The agent can query server status and the resource list without side effects.
  • Endpoint choices are documented in skills/txadmin-integration/SKILL.md, including the txAdmin versions tested.
  • New tools have tests against a fake local panel.

Getting started

  • Relevant files: mcp-server/tools/txadmin.py, mcp-server/tools/txadmin_client.py, mcp-server/server.py
  • How to run checks: there is no test suite yet; run the MCP server with cd mcp-server && pip install -r requirements.txt && python server.py, and CI checks live in .github/workflows/validate.yml
  • Related docs: skills/txadmin-integration/SKILL.md, docs/ROADMAP.md (Milestone 4)

Filed by repo-audit/full-audit at 701824d. Severity: medium. Effort: S. audit-key: enhancement|mcp-server/tools/txadmin.py|txadmin_status

主要語言
Python
星號
7
分支
4
PR 合併指標
30 天內沒有已合併 PR

環境準備

  • 沒有 Dockerfile 或 Docker Compose 檔案
  • 沒有 Pull Request 範本
  • 閱讀貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

TMHSDigital/CFX-Developer-Tools 的其他 Issue

查看 TMHSDigital/CFX-Developer-Tools 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。