Skip to content

Tighten snapshot/window models, typed packaging marker, and protocol docs #75

Description

@tony

Problem

Several small public-surface gaps make the server less ergonomic and less accurate for MCP clients.

Grouped here because each fix is small and independently testable.

Items

  1. snapshot_pane should include important tmux state:

    • pane_pid
    • pane_dead
    • alternate_on
  2. WindowInfo should include active_pane_id, matching the convenience already present on SessionInfo.

  3. The package advertises typed distribution but does not ship py.typed.

  4. README's tool table is stale and misses current tools such as:

    • list_servers
    • wait_for_channel
    • signal_channel
    • buffer tools
    • hook inspection tools
  5. Completion docs describe inherited completion behavior, but a real completion/complete request currently returns Method not found.

  6. Pagination docs say protocol list calls return nextCursor, but this server does not configure list_page_size.

  7. Prompt docs say run_and_wait preserves exit status, then later say it does not.

Upstream references

Minimal local recreation

Check current server surface:

$ uv run fastmcp inspect fastmcp.json

Check completion behavior:

$ uv run python - <<'PY'
import asyncio
from fastmcp import Client
from mcp import types
from libtmux_mcp.server import build_mcp_server

async def main():
    async with Client(build_mcp_server()) as client:
        await client.complete(
            types.PromptReference(type="ref/prompt", name="run_and_wait"),
            {"name": "command", "value": "py"},
        )

asyncio.run(main())
PY

Expected today: McpError Method not found.

Minimal fix

  • Add only the three snapshot fields listed above.
  • Add active_pane_id to WindowInfo.
  • Add src/libtmux_mcp/py.typed.
  • Regenerate or manually update the README tool inventory.
  • Rewrite completion and pagination docs to describe current behavior.
  • Fix the run_and_wait exit-status sentence.

Acceptance criteria

  • snapshot_pane returns pane_pid, pane_dead, and alternate_on.
  • create_window / WindowInfo includes active_pane_id.
  • Built wheel/sdist includes libtmux_mcp/py.typed.
  • README tool inventory matches tools/list.
  • Completion docs no longer claim a working completion/complete surface.
  • Pagination docs distinguish FastMCP capability from this server's current configuration.
  • Prompt docs consistently state that run_and_wait does not preserve exit status.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or requestgood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions