-
Couldn't load subscription status.
- Fork 26
Data tool consolidation #65
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
Conversation
docs: Add Designer MCP Installation Instructions
docs: update setup instructions for Webflow MCP Bridge App
revise Cursor config for official remote MCP support
Duplication instruction removed
Local Installation Documentation
Added TypeScript types for text and image content, along with a unified ToolResponse type. Introduced utility functions for creating text and image content, and for formatting tool responses. This improves type safety and clarity in handling different response formats.
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.
Made a pass through the consolidation changes and overall looks good!
| ); | ||
| return formatResponse(response); | ||
| for (const action of actions) { | ||
| if (action.list_components) { |
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.
might be cleaner as a switch statement?
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.
Thanks for pointing that out. A switch-case isn’t ideal for this pattern since it can’t handle multiple operations per action. However, I’ve removed the else if chain that was preventing other properties from being checked. I fixed it by switching to independent if statements instead, this way, all properties are properly evaluated.
src/tools/components.ts
Outdated
| ComponentPropertyUpdateSchema | ||
| } from "../schemas"; | ||
| import { formatErrorResponse, formatResponse } from "../utils"; | ||
| import { Content, formatErrorResponse, textContent, toolResponse } from "../utils"; |
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.
| import { Content, formatErrorResponse, textContent, toolResponse } from "../utils"; | |
| import { type Content, formatErrorResponse, textContent, toolResponse } from "../utils"; |
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.
Done!
Updated the CMS tool to enhance TypeScript type definitions for function arguments and responses, ensuring better clarity and maintainability. Consolidated import statements and improved formatting for better readability. This refactor aligns with recent updates across other tools for a unified codebase.
Similar to DE Tools, this PR introduces updates to Data Tools. Instead of maintaining separate tools for each Data API, we’ve consolidated them by type. For example, the site tool can now be used to list sites, publish, or get site details.