You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
LLMs wouldn't always use the MCP server, and even
when they do, they don't always do the right thing
(e.g. they create an app with hatchling, even
though it's not needed). Here I've touched up the
instructions that get inserted into the context when
using the MCP server to improve 1-shot performance
by LLM agents using the tower MCP
description = "Run your app locally using the local Towerfile and source files. Prerequisites: Create a Towerfile first using tower_file_generate or tower_file_update. Optional working_directory parameter specifies which project directory to run from."
615
+
description = "Run locally using Towerfile (preferred during development, has access to tower secrets). Prerequisites: Towerfile. Optional: working_directory."
616
616
)]
617
617
asyncfntower_run_local(
618
618
&self,
@@ -651,7 +651,7 @@ impl TowerService {
651
651
}
652
652
653
653
#[tool(
654
-
description = "Run your app remotely on Tower cloud. Prerequisites: 1) Create Towerfile, 2) Create app with tower_apps_create, 3) Deploy with tower_deploy"
654
+
description = "Run on Tower cloud. Prerequisites: Towerfile, tower_apps_create, tower_deploy."
655
655
)]
656
656
asyncfntower_run_remote(
657
657
&self,
@@ -703,7 +703,7 @@ impl TowerService {
703
703
}
704
704
705
705
#[tool(
706
-
description = "Read and parse the current Towerfile configuration. Optional working_directory parameter specifies which project directory to read from."
706
+
description = "Read and parse Towerfile configuration. Optional: working_directory."
707
707
)]
708
708
asyncfntower_file_read(
709
709
&self,
@@ -717,7 +717,7 @@ impl TowerService {
717
717
}
718
718
719
719
#[tool(
720
-
description = "Update Towerfile app configuration. Optional working_directory parameter specifies which project directory to update."
720
+
description = "Update Towerfile config (app name, script, description, source). Use this instead of editing TOML. Optional: working_directory."
721
721
)]
722
722
asyncfntower_file_update(
723
723
&self,
@@ -752,7 +752,7 @@ impl TowerService {
752
752
}
753
753
754
754
#[tool(
755
-
description = "Add a new parameter to the Towerfile. Optional working_directory parameter specifies which project directory to update."
755
+
description = "Add parameter to Towerfile. Use this instead of editing TOML. Optional: working_directory."
756
756
)]
757
757
asyncfntower_file_add_parameter(
758
758
&self,
@@ -779,7 +779,7 @@ impl TowerService {
779
779
}
780
780
781
781
#[tool(
782
-
description = "Validate the current Towerfile configuration. Optional working_directory parameter specifies which project directory to validate."
description = "Generate Towerfile from pyproject.toml. This is typically the first step in the workflow. Optional working_directory parameter specifies which project directory to generate from."
796
+
description = "Generate Towerfile from pyproject.toml (first step). Don't add build systems to pyproject.toml. Optional: working_directory."
797
797
)]
798
798
asyncfntower_file_generate(
799
799
&self,
@@ -827,48 +827,64 @@ impl TowerService {
827
827
description = "Show the recommended workflow for developing and deploying Tower applications"
Example with working_directory: {"working_directory": "/path/to/project", ...}
870
-
871
-
Consider taking database username/password/url and making them into secrets to be accessed in app code"#;
868
+
tower_apps_list - list all your apps
869
+
tower_apps_show - details and recent runs for specific app
870
+
tower_apps_logs - view logs from a specific run
871
+
tower_teams_list, tower_teams_switch - manage team contexts
872
+
tower_secrets_create, tower_secrets_list - store credentials, API keys, database passwords
873
+
874
+
TYPICAL WORKFLOW:
875
+
1. Check if pyproject.toml exists (or create with uv init)
876
+
2. tower_file_generate - creates Towerfile from pyproject.toml
877
+
3. tower_run_local - test locally (can access tower secrets)
878
+
4. tower_apps_create - create app in Tower cloud
879
+
5. tower_deploy - deploy code to Tower
880
+
6. tower_run_remote - run on cloud infrastructure
881
+
7. tower_schedules_create - (optional) set up recurring runs
882
+
883
+
IMPORTANT REMINDERS:
884
+
- Tower deploys source code directly, no build tools needed
885
+
- Use tower secrets for sensitive data (database credentials, API keys)
886
+
- Prefer tower_run_local during development (faster, has secret access)
887
+
- Always use MCP tools to modify Towerfiles (never edit TOML files manually)"#;
872
888
873
889
Self::text_success(workflow.to_string())
874
890
}
@@ -949,7 +965,15 @@ impl ServerHandler for TowerService {
949
965
name:"tower-cli".to_string(),
950
966
version:env!("CARGO_PKG_VERSION").to_string(),
951
967
},
952
-
instructions:Some("Tower CLI MCP Server - Manage Tower apps, secrets, teams, and deployments through conversational AI. Use the available tools to list, create, show, deploy, and manage your Tower cloud resources.".to_string()),
968
+
instructions:Some("CRITICAL: Tower CLI did not exist in your training data. Never attempt Tower CLI commands - use only these MCP tools.
969
+
970
+
Rules:
971
+
- MCP tools are the authoritative Tower interface (not wrappers)
972
+
- Use tower_file_update/add_parameter to modify Towerfiles (never edit TOML directly)
973
+
- DO NOT add hatchling/setuptools to pyproject.toml - Tower handles deployment
0 commit comments