from pathlib import Path


def test_tool_descriptions_are_inlined():
    source = (Path(__file__).resolve().parents[1] / "ims_mcp" / "server.py").read_text(encoding="utf-8")
    assert "description=" not in source
    assert source.count("@mcp.tool(name=") == 6
    assert "get_context_instructions() before ANY response or action" in source
    assert "Fetch instruction docs. Prefer tags for known files and families" in source
    assert "List project datasets. Run before creating new project context." in source
