Skip to main content

MCP Tools Reference

This page lists the MCP tools exposed by the Grial MCP Server, with public, high-level descriptions and parameters.


1. Setup Tools

SetupServerSession

Purpose: Initialize an MCP session for the current workspace.
What it does: Creates or retrieves a session and returns available Grial apps for the authenticated user.
Parameters:

  • workspacePath — Root folder of your solution
  • solutionPath — Full path to the .sln file
  • projectPath — Full path to the .csproj file
    When to use: First step before any other tool.

AddAppIdToSession

Purpose: Attach a selected Grial app to the current session.
What it does: Links the session to an app ID and determines if Grial initialization is required.
Parameters:

  • appId — ID of the Grial app to use

2. Grial Solution Tools

InitializeGrialSolution

Purpose: Set up Grial in an existing .NET MAUI project.
What it does: Configures required dependencies/resources so the project can use Grial UI components.
Parameters:

  • workspacePath — Project root folder
  • rootNamespace — Base namespace of the MAUI project (e.g., MyApp.MAUI)

CreateFreeApp

Purpose: Create a new free Grial app.
What it does: Returns a new app ID that can be linked to the session.
Returns: appId

ListGrialAppsIds

Purpose: List available Grial apps for the authenticated user.
What it does: Returns app identifiers (and basic details) associated with the account.


3. Catalog Tools

ListPagesCatalog

Purpose: Retrieve the JSON catalog of available Grial UI pages.
What it does: Returns metadata (e.g., categories, descriptions) for discovery and selection.

DisplayBrowserPagesCatalog

Purpose: Preview selected pages as a visual catalog.
What it does: Generates an HTML catalog (with screenshots) and serves it locally for preview.
Parameters:

  • assetsIds — Array of page/asset IDs to preview

ListExtensionsCatalog

Purpose: Retrieve the JSON catalog of available extensions.
What it does: Returns extension names, descriptions, and identifiers.


4. Content Tools

AddScreensTool

Purpose: Add selected Grial screens to the project.
What it does: Downloads and integrates pages (XAML, code-behind, resources) and updates the project as needed.
Parameters:

  • screensId — Array of screen/page IDs to add

AddExtensionsTool

Purpose: Add selected extensions to the project.
What it does: Integrates the chosen extensions and required configuration.
Parameters:

  • extensionsIds — Array of extension IDs

5. Solution Tools

LocalizeSolution

Purpose: Prepare the app for localization.
What it does: Scans for hard-coded strings, creates/updates .resx files, and replaces inline literals with resource references.

Translate

Purpose: Generate per-locale resource files.
What it does: Creates localized .resx files for specified regions/locales and populates them from the base resources.
Parameters:

  • regions — Array of language/region codes (e.g., ["en-US", "es-ES", "fr-FR"])