diff --git a/gateway/mcp/README.md b/gateway/mcp/README.md index d272e6b..1de8e6d 100644 --- a/gateway/mcp/README.md +++ b/gateway/mcp/README.md @@ -35,9 +35,9 @@ You need to: "--refresh", "--from", "/ABSOLUTE/PATH/TO/INVARIANT_GATEWAY_REPO/dist/invariant_gateway-0.0.1-py3-none-any.whl", - "invariant-gateway", + "run", "mcp", - "--dataset-name", + "--project-name", "weather-testing", "--push-explorer", "--exec", @@ -59,5 +59,5 @@ This moves the original `command` and `args` to the `args` list after the `--exe All args before the `--exec` flag are relevant to the Invariant MCP gateway. These include: -- `--dataset-name`: With this you can specify the name of the dataset. The guardrails are pulled from this dataset. -- `--push-explorer`: With this you can specify if you want to push the annotated traces to the Invariant Explorer. +- `--project-name`: With this you can specify the name of the Invariant Explorer project (dataset). The guardrails are pulled from this. +- `--push-explorer`: With this you can specify if you want to push the annotated traces to the Invariant Explorer. The annotated traces are pushed to the project name provided above. diff --git a/gateway/mcp/mcp_context.py b/gateway/mcp/mcp_context.py index a4dced6..61986fb 100644 --- a/gateway/mcp/mcp_context.py +++ b/gateway/mcp/mcp_context.py @@ -28,7 +28,8 @@ class McpContext: return config = self._parse_cli_args(cli_args) - self.explorer_dataset = config.dataset_name + # The project name is used to identify the dataset in Invariant Explorer. + self.explorer_dataset = config.project_name self.push_explorer = config.push_explorer self.trace = [] self.tools = [] @@ -47,8 +48,8 @@ class McpContext: """Parse command line arguments.""" parser = argparse.ArgumentParser(description="MCP Gateway") parser.add_argument( - "--dataset-name", - help="Name of the dataset where we want to push the MCP traces", + "--project-name", + help="Name of the Project from Invariant Explorer where we want to push the MCP traces. The guardrails are pulled from this project.", type=str, default=f"mcp-capture-{random.randint(1, 100)}", ) diff --git a/pyproject.toml b/pyproject.toml index a3839f3..185e050 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,7 +17,7 @@ where = ["."] exclude = ["tests", "tests.*"] [project.scripts] -invariant-gateway = "gateway.__main__:main" +run = "gateway.__main__:main" [build-system] requires = ["setuptools>=61.0", "wheel"]