Skip to content

Commit 8150d76

Browse files
committed
Improve MCP tool description and add version bump documentation
1 parent aa584a3 commit 8150d76

File tree

2 files changed

+30
-3
lines changed

2 files changed

+30
-3
lines changed

CLAUDE.md

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,31 @@ Do NOT use the MCP server for:
7373
- File operations within the container
7474
- Reading files or exploring the codebase
7575

76-
These operations should be done directly in the container using standard tools.
76+
These operations should be done directly in the container using standard tools.
77+
78+
## Version Bumping
79+
80+
Before scheduling a TeamCity build or deploy, the version must be bumped. This is done via the `VersionBump` build configuration on TeamCity.
81+
82+
### How to Bump Version
83+
84+
Use the MCP `ExecuteCommand` tool to trigger the VersionBump build via TeamCity API (requires `TEAMCITY_CLOUD_TOKEN` on host):
85+
86+
```powershell
87+
$headers = @{
88+
"Authorization" = "Bearer $env:TEAMCITY_CLOUD_TOKEN"
89+
"Content-Type" = "application/json"
90+
"Accept" = "application/json"
91+
}
92+
$body = @{
93+
buildType = @{ id = "<ProjectPrefix>_VersionBump" }
94+
branchName = "<branch>"
95+
} | ConvertTo-Json
96+
Invoke-RestMethod -Uri "https://postsharp.teamcity.com/app/rest/buildQueue" -Method Post -Headers $headers -Body $body
97+
```
98+
99+
### Finding the Build Type ID
100+
101+
1. Check `.teamcity/settings.kts` for the VCS root: `AbsoluteId("...")`
102+
2. The build type ID is: `<VcsRootId>_VersionBump`
103+
3. For this repo: `Engineering_PostSharpEngineering_VersionBump`

src/PostSharp.Engineering.BuildTools/Mcp/Tools/ExecuteCommandTool.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ public ExecuteCommandTool(
3535
}
3636

3737
[McpServerTool]
38-
[Description( "Execute a command on the host machine. Requires human approval. Use this for git push, GitHub operations, and other actions that affect external systems." )]
38+
[Description( "Execute a PowerShell command on the host machine. Requires human approval. Use this for git push, GitHub operations, and other actions that affect external systems or require privileges or tokens that the container does not have." )]
3939
public async Task<CommandResult> ExecuteCommand(
4040
[Description( "Unique session identifier for tracking command history" )]
4141
string sessionId,
42-
[Description( "The command to execute (e.g., 'git push origin main')" )]
42+
[Description( "The command to execute (e.g., 'git push origin main'). Must be valid PowerShell script." )]
4343
string command,
4444
[Description( "The working directory for command execution" )]
4545
string workingDirectory,

0 commit comments

Comments
 (0)