Claude/fix grist ctx parameter xqhnr#6
Merged
Conversation
- Fix ctx parameter to be properly injected by FastMCP - Clients no longer need to pass ctx=null when calling tools
## Bug Fixes
- create_table: use correct format {"tables": [{"id": ..., "columns": [{"id": ..., "fields": {...}}]}]}
- modify_table: use correct format {"tables": [{"id": ..., "fields": {"tableId": ...}}]}
- create_column/modify_column: serialize widgetOptions as JSON string
- create_column: add choices, visible_col, untie_col_id_from_label, description params
- download_table_csv: use download_doc_csv with tableId parameter
## New Features
- create_reference_column: Create Ref/RefList columns with auto visibleCol resolution
- validate_schema: Validate schema structure without creating tables
- create_schema: Create complete schema with tables, columns, references in 5 phases
- export_schema: Export existing document schema to JSON/YAML/Mermaid
## New Files
- src/mcp_server_grist/types.py: Type definitions and schema parsing
- src/mcp_server_grist/tools/utils.py: Shared utility functions
- src/mcp_server_grist/tools/schema.py: New schema tools
- tests/test_schema.py: Unit tests for schema functionality
- CHANGELOG.md: Version history
- client.py: Add table_id parameter to download_doc_xlsx - tools/export.py: Add table_id parameter and auto-selection - tools/schema.py: Use correct client methods (list_tables, list_columns, etc.) - tools/utils.py: Fix client method calls All tools verified working: ✅ create_table, modify_table ✅ create_column, modify_column (widgetOptions serialized) ✅ download_table_csv, download_document_excel ✅ create_reference_column (auto visibleCol) ✅ validate_schema, create_schema, export_schema
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.