-
Notifications
You must be signed in to change notification settings - Fork 6
feat: comprehensive MCP service tool improvements #30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
78b30c5
fix: rename MCP tools to remove redundant tiger_ prefix
cevian b843fb3
feat: implement comprehensive MCP tool improvements
cevian 593d4be
docs: finalize MCP feedback implementation status
cevian e3c495a
docs: add MCP tool description optimization analysis
cevian 739d7d1
docs: update MCP feedback with implementation status
cevian 0ec8a11
refactor: streamline MCP tool descriptions for LLM optimization
cevian 885d0c0
refactor: rename timeout to timeout_minutes in service_create MCP tool
cevian 97eb349
refactor: address PR feedback on MCP service tool definitions
cevian 87f70d6
docs: move mcp_feedback.md to docs folder
cevian File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,128 @@ | ||
| # TigerData MCP Feedback | ||
|
|
||
| ## Overall Assessment | ||
| The TigerData MCP tools provide useful database management functionality but have several areas for improvement in naming consistency, parameter documentation, and descriptions. | ||
|
|
||
| ## Tool Names | ||
|
|
||
| ### Issues | ||
| 1. **Inconsistent naming conventions**: Mixed use of camelCase (`getGuide`) and snake_case (`service_list`, `semantic_search`) creates unpredictability | ||
| 2. **Verb consistency**: Some tools use action verbs (`create`, `list`) while others use descriptive terms (`show` instead of `get`) | ||
|
|
||
| ### Recommendations | ||
| - **WHY**: Consistency reduces cognitive load and makes the API more predictable | ||
| - Standardize on snake_case throughout: `get_guide`, `semantic_search_postgres_docs` | ||
| - Use consistent verbs: `service_get` instead of `service_show` for alignment with REST conventions | ||
|
|
||
| ## Input Parameters | ||
|
|
||
| ### `mcp__tigerdata__getGuide` | ||
| **Issue**: Parameter `prompt_name` is misleading - these are guides, not prompts | ||
| **Recommendation**: Rename to `guide_name` or `guide_id` | ||
| **WHY**: Clear naming prevents confusion about what values are expected | ||
|
|
||
| ### `mcp__tigerdata__semanticSearchPostgresDocs` | ||
| **Critical Issues**: | ||
| 1. Parameter type confusion: `version` marked as required but allows null | ||
| 2. Type mismatch: PostgreSQL versions like "17.2" need string type, not integer | ||
| **Recommendations**: | ||
| - Make `version` and `limit` truly optional by removing from required array | ||
| - Change `version` to string type | ||
| **WHY**: Prevents runtime errors and failed API calls | ||
|
|
||
| ### `mcp__tigerdata__service_create` | ||
| **Strengths**: Excellent use of enums, clear defaults, good examples | ||
| **✅ IMPLEMENTED**: Renamed `timeout` parameter to `timeout_minutes` for clarity | ||
| **Result**: Parameter name now explicitly indicates units, preventing confusion. | ||
|
|
||
| ### `mcp__tigerdata__service_update_password` | ||
| **Missing**: No password strength requirements documented | ||
| **Recommendation**: Add validation rules (min length, character requirements) to description | ||
| **WHY**: Prevents failed attempts due to weak passwords | ||
|
|
||
| ## Descriptions | ||
|
|
||
| ### Excellent Examples | ||
| - `service_create`: Clear billing warnings, thorough wait/timeout explanation | ||
| - `getGuide`: Upfront listing of all available guides | ||
|
|
||
| ### Needs Improvement | ||
|
|
||
| 1. **`semanticSearchPostgresDocs`** | ||
| - Missing: Return format, number of results, relevance scoring | ||
| - **Recommendation**: "Searches PostgreSQL docs using semantic similarity. Returns up to N results with content, metadata, and distance scores (lower = more relevant)" | ||
| - **WHY**: Users need to understand what they'll receive | ||
|
|
||
| 2. **`service_list`** | ||
| - Unclear: How is "current project" determined? | ||
| - **Recommendation**: Specify if from auth context or parameter | ||
| - **WHY**: Ambiguity about data scope causes confusion | ||
|
|
||
| ## Functionality Testing Results | ||
|
|
||
| ### Working Well | ||
| - All tested tools executed successfully | ||
| - Response times were reasonable | ||
| - JSON responses well-structured | ||
|
|
||
| ### Issues Discovered | ||
|
|
||
| 1. **Guide Content Length**: The `setup_hypertable` guide returns 15,000+ characters | ||
| - **Impact**: Can consume significant LLM context | ||
| - **Recommendation**: Break into smaller focused guides or add length warnings | ||
| - **WHY**: Prevents context exhaustion in conversations | ||
|
|
||
| 2. **Missing Error Documentation**: No information about possible error codes or formats | ||
| - **Recommendation**: Add common error scenarios to each tool description | ||
| - **WHY**: Enables proper error handling | ||
|
|
||
| ## Missing Critical Functionality | ||
|
|
||
| 1. **No service deletion**: Can create but not remove services | ||
| 2. **No pause/resume**: Response shows "paused" field but no control mechanism | ||
| 3. **No SQL execution**: Can't run queries against created services | ||
| 4. **No connection string helper**: Users must construct connection strings manually | ||
|
|
||
| **WHY THESE MATTER**: Complete lifecycle management requires all CRUD operations | ||
|
|
||
| ## Schema Design Observations | ||
|
|
||
| ### Resource Format Inconsistency | ||
| - **Input**: `"cpu_memory": "0.5 CPU/2GB"` (combined string) | ||
| - **Output**: `{"cpu": "0.5 cores", "memory": "2 GB"}` (separate fields) | ||
| - **Impact**: Requires different parsing logic for input vs output | ||
| - **Recommendation**: Use consistent format or document the rationale | ||
| - **WHY**: Reduces implementation complexity | ||
|
|
||
| ## Specific Priority Improvements | ||
|
|
||
| ### High Priority | ||
| 1. Fix parameter type issues in `semanticSearchPostgresDocs` | ||
| 2. Standardize naming conventions across all tools | ||
| 3. Add service deletion capability | ||
| 4. ~~Rename timeout to timeout_minutes~~ ✅ COMPLETED | ||
|
|
||
| ### Medium Priority | ||
| 1. Document return formats in all descriptions | ||
| 2. Add error code documentation | ||
| 3. Break up large guide content | ||
|
|
||
| ### Low Priority | ||
| 1. Add filtering to `service_list` | ||
| 2. Include connection string formatting helper | ||
| 3. Add dry-run options for destructive operations | ||
|
|
||
| ## Positive Highlights | ||
| - Excellent enum usage for constrained choices | ||
| - Good use of JSON Schema for validation | ||
| - Clear billing warnings where appropriate | ||
| - Well-structured responses with consistent formatting | ||
| - Semantic search provides relevant, useful results | ||
| - Good use of defaults to simplify common cases | ||
|
|
||
| ## Why These Improvements Matter | ||
| 1. **Predictability**: Consistent naming reduces learning curve | ||
| 2. **Reliability**: Proper typing prevents runtime failures | ||
| 3. **Usability**: Clear documentation reduces trial-and-error | ||
| 4. **Completeness**: Full CRUD operations enable real workflows | ||
| 5. **Efficiency**: Appropriate content sizing preserves LLM context | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the record, the rationale for the combined input strings is to prevent the LLM from selecting invalid combinations of CPU/memory in the request. Making it a single field with enum values makes it impossible for the LLM to select invalid combinations.
We could do the same for the output, but we don't have the same problem on the output side (and I'm not actually convinced that consistency between input and output really matters to the LLM)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep agreed