Skip to content

Add comprehensive MCP agent management tools with filesystem integration#33

Merged
epuerta9 merged 1 commit into
mainfrom
feature/mcp-agent-management-tools
Aug 11, 2025
Merged

Add comprehensive MCP agent management tools with filesystem integration#33
epuerta9 merged 1 commit into
mainfrom
feature/mcp-agent-management-tools

Conversation

@epuerta9
Copy link
Copy Markdown
Collaborator

Summary

• Added 4 new MCP tools for complete agent management via Claude Code and other MCP clients
• Full database integration with proper validation and error handling
• Filesystem export functionality matching CLI behavior exactly

New MCP Tools Added

  1. update_agent_prompt - Update an agent's system prompt
  2. add_tool - Add individual tools to an agent
  3. remove_tool - Remove individual tools from an agent
  4. export_agent - Export agent configuration to dotprompt format with filesystem write

Technical Implementation

  • Database Integration: Added UpdatePrompt method to AgentRepo with SQLC query
  • MCP Server: Added 4 tools to tools_setup.go (now 15 total tools)
  • Handler Functions: Complete implementation in handlers_fixed.go with comprehensive error handling
  • Filesystem Export: Writes to ~/.config/station/environments/{env}/agents/ like CLI
  • Directory Creation: Automatic parent directory creation with proper permissions

Testing Results

✅ All 4 tools tested and verified working with live database
✅ Export tool writes files to filesystem correctly
✅ Proper validation and error handling for all edge cases
✅ Complete feature parity with Station CLI

Test Plan

  • Verify all 4 MCP tools are available via tools/list
  • Test update_agent_prompt with database updates
  • Test add_tool and remove_tool with agent-tool relationships
  • Test export_agent with filesystem write to correct location
  • Verify proper error handling for invalid inputs
  • Confirm exported dotprompt files match CLI export format

🤖 Generated with Claude Code

Features:
• update_agent_prompt - Update agent system prompts via MCP
• add_tool - Add individual tools to agents
• remove_tool - Remove individual tools from agents
• export_agent - Export agents to dotprompt files with filesystem write

Implementation:
• Added 4 new MCP tools to tools_setup.go (15 total tools)
• Added complete handler functions with database integration
• Added UpdatePrompt method to AgentRepo with SQLC query
• Added filesystem export matching CLI behavior exactly
• Full error handling and validation for all edge cases

Database Changes:
• New UpdateAgentPrompt SQLC query for targeted prompt updates
• Updated agent repository with UpdatePrompt method

Testing:
• All 4 tools tested and verified working with live database
• Export tool writes to ~/.config/station/environments/{env}/agents/
• Proper directory creation and file permissions
• Complete feature parity with Station CLI

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@epuerta9
Copy link
Copy Markdown
Collaborator Author

🚀 Ready for merge! All MCP agent management tools are fully implemented and tested:

Key Features Verified:

  • update_agent_prompt: Successfully updates agent system prompts
  • add_tool/remove_tool: Manages agent-tool relationships in real-time
  • export_agent: Writes dotprompt files to filesystem matching CLI exactly

Database Operations: All CRUD operations working with proper validation
Filesystem Integration: Export creates files in correct GitOps location
Error Handling: Comprehensive validation for all edge cases

These tools provide complete feature parity with Station CLI, enabling full agent management through MCP clients like Claude Code! 🎯

@epuerta9 epuerta9 merged commit 8c61368 into main Aug 11, 2025
1 of 10 checks passed
epuerta9 added a commit that referenced this pull request Aug 20, 2025
…ion (#33)

Features:
• update_agent_prompt - Update agent system prompts via MCP
• add_tool - Add individual tools to agents
• remove_tool - Remove individual tools from agents
• export_agent - Export agents to dotprompt files with filesystem write

Implementation:
• Added 4 new MCP tools to tools_setup.go (15 total tools)
• Added complete handler functions with database integration
• Added UpdatePrompt method to AgentRepo with SQLC query
• Added filesystem export matching CLI behavior exactly
• Full error handling and validation for all edge cases

Database Changes:
• New UpdateAgentPrompt SQLC query for targeted prompt updates
• Updated agent repository with UpdatePrompt method

Testing:
• All 4 tools tested and verified working with live database
• Export tool writes to ~/.config/station/environments/{env}/agents/
• Proper directory creation and file permissions
• Complete feature parity with Station CLI

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: Claude <noreply@anthropic.com>
epuerta9 added a commit that referenced this pull request Aug 30, 2025
…ion (#33)

Features:
• update_agent_prompt - Update agent system prompts via MCP
• add_tool - Add individual tools to agents
• remove_tool - Remove individual tools from agents
• export_agent - Export agents to dotprompt files with filesystem write

Implementation:
• Added 4 new MCP tools to tools_setup.go (15 total tools)
• Added complete handler functions with database integration
• Added UpdatePrompt method to AgentRepo with SQLC query
• Added filesystem export matching CLI behavior exactly
• Full error handling and validation for all edge cases

Database Changes:
• New UpdateAgentPrompt SQLC query for targeted prompt updates
• Updated agent repository with UpdatePrompt method

Testing:
• All 4 tools tested and verified working with live database
• Export tool writes to ~/.config/station/environments/{env}/agents/
• Proper directory creation and file permissions
• Complete feature parity with Station CLI

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: Claude <noreply@anthropic.com>
epuerta9 added a commit that referenced this pull request Sep 2, 2025
…ion (#33)

Features:
• update_agent_prompt - Update agent system prompts via MCP
• add_tool - Add individual tools to agents
• remove_tool - Remove individual tools from agents
• export_agent - Export agents to dotprompt files with filesystem write

Implementation:
• Added 4 new MCP tools to tools_setup.go (15 total tools)
• Added complete handler functions with database integration
• Added UpdatePrompt method to AgentRepo with SQLC query
• Added filesystem export matching CLI behavior exactly
• Full error handling and validation for all edge cases

Database Changes:
• New UpdateAgentPrompt SQLC query for targeted prompt updates
• Updated agent repository with UpdatePrompt method

Testing:
• All 4 tools tested and verified working with live database
• Export tool writes to ~/.config/station/environments/{env}/agents/
• Proper directory creation and file permissions
• Complete feature parity with Station CLI

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: Claude <noreply@anthropic.com>
toininoi pushed a commit to toininoi/station that referenced this pull request Mar 23, 2026
…ion (cloudshipai#33)

Features:
• update_agent_prompt - Update agent system prompts via MCP
• add_tool - Add individual tools to agents
• remove_tool - Remove individual tools from agents
• export_agent - Export agents to dotprompt files with filesystem write

Implementation:
• Added 4 new MCP tools to tools_setup.go (15 total tools)
• Added complete handler functions with database integration
• Added UpdatePrompt method to AgentRepo with SQLC query
• Added filesystem export matching CLI behavior exactly
• Full error handling and validation for all edge cases

Database Changes:
• New UpdateAgentPrompt SQLC query for targeted prompt updates
• Updated agent repository with UpdatePrompt method

Testing:
• All 4 tools tested and verified working with live database
• Export tool writes to ~/.config/station/environments/{env}/agents/
• Proper directory creation and file permissions
• Complete feature parity with Station CLI

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant