Skip to main content
Glama
mckinsey

vizro-mcp

Official
by mckinsey

get_vizro_chart_or_dashboard_plan

Get step-by-step instructions for creating Vizro charts or dashboards. Start with basic configuration, then use advanced mode for custom CSS, components, or actions.

Instructions

Get instructions for creating a Vizro chart or dashboard. Call FIRST when asked to create Vizro things.

Must be ALWAYS called FIRST with advanced_mode=False, then call again with advanced_mode=True
if the JSON config does not suffice anymore.

Returns:
    Instructions for creating a Vizro chart or dashboard

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
user_planYesThe type of Vizro thing the user wants to create
user_hostYesThe host the user is using, if 'ide' you can use the IDE/editor to run python code
advanced_modeNoOnly call if you need to use custom CSS, custom components or custom actions. No need to call this with advanced_mode=True if you need advanced charts, use `custom_charts` in the `validate_dashboard_config` tool instead.

Implementation Reference

  • The core handler function for the 'get_vizro_chart_or_dashboard_plan' tool, decorated with @mcp.tool(). It returns specific instructions for chart or dashboard creation based on input parameters, delegating to imported utilities for the content.
    def get_vizro_chart_or_dashboard_plan(
        user_plan: Literal["chart", "dashboard"] = Field(description="The type of Vizro thing the user wants to create"),
        user_host: Literal["generic_host", "ide"] = Field(
            description="The host the user is using, if 'ide' you can use the IDE/editor to run python code"
        ),
        advanced_mode: bool = Field(
            default=False,
            description="""Only call if you need to use custom CSS, custom components or custom actions.
    No need to call this with advanced_mode=True if you need advanced charts,
    use `custom_charts` in the `validate_dashboard_config` tool instead.""",
        ),
    ) -> str:
        """Get instructions for creating a Vizro chart or dashboard. Call FIRST when asked to create Vizro things.
    
        Must be ALWAYS called FIRST with advanced_mode=False, then call again with advanced_mode=True
        if the JSON config does not suffice anymore.
    
        Returns:
            Instructions for creating a Vizro chart or dashboard
        """
        if user_plan == "chart":
            return CHART_INSTRUCTIONS
        elif user_plan == "dashboard":
            return f"{get_dashboard_instructions(advanced_mode, user_host)}"

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mckinsey/vizro'

If you have feedback or need assistance with the MCP directory API, please join our Discord server