Skip to content

Feat: pass UI data with tools#1983

Merged
themaherkhalil merged 42 commits intodevfrom
mcp-ui-metadata
Jan 27, 2026
Merged

Feat: pass UI data with tools#1983
themaherkhalil merged 42 commits intodevfrom
mcp-ui-metadata

Conversation

@tevanburen
Copy link
Copy Markdown
Contributor

@tevanburen tevanburen commented Jan 16, 2026

Documentation

Description

This update adds MCP UI decorator functionality and metadata handling to the MCP framework.

Changes Made

MakePythonMCP

  • Added MCP UI decorator that takes in a map and puts it in the smss_mcp_ui key in metadata
  • Validates displayLocation against valid types

MakePixelMCP and MakeEngineMCP

  • Now accept mcpMetadata parameter with values for:
    • loadingMessage
    • resourceURI
    • displayLocation
  • Validates location parameter
  • Allows any values for URI and loading message
  • Breaking Change: All MCPs will now have the SMSS_MCP_UI key in metadata (can be an empty map)

How to Test

Python Implementation

  1. Add the import to your Python file:
from smssutil import mcp_metadata

Add the decorator above your MCP method:

@mcp_metadata({
    "resourceURI": None,
    "displayLocation": "inline"
})

Verify metadata by calling MakePythonMCP. The MCP JSON should contain:

"_meta": {
    "generated_on": "2026-01-23",
    "SMSS_MCP_EXECUTION": "ask",
    "SMSS_MCP_UI": {
        "resourceURI": null,
        "displayLocation": "inline"
    }
}

Pixel Implementation
Call MakePixelMCP or MakeEngineMCP with:

Your desired reactors to convert into MCPs
mcpMetadata parameter containing a list of maps (one per reactor)
Example:

MakePixelMCP(
    reactor=["ToPdf"], 
    mcpMetadata=[{
        "SMSS_MCP_EXECUTION": "fake execution type", 
        "SMSS_MCP_UI": {
            "loadingMessage": "Loading tool", 
            "displayLocation": "inline"
        }
    }]
)

Validate the metadata:

"_meta": {
   "SMSS_MCP_UI": {
        "loadingMessage": "Loading tool",
        "displayLocation": "inline"
    },
    "SMSS_MCP_EXECUTION": "ask"
},

@tevanburen tevanburen self-assigned this Jan 16, 2026
@tevanburen tevanburen marked this pull request as ready for review January 23, 2026 21:58
@tevanburen tevanburen requested a review from a team as a code owner January 23, 2026 21:58
@themaherkhalil
Copy link
Copy Markdown
Collaborator

Note: switched from the proposed @mcp_ui to @mcp_metadata. @mcp_metadata will take in "execution" value and @mcp_execution is now deprecated.

@themaherkhalil themaherkhalil merged commit 8052d38 into dev Jan 27, 2026
3 checks passed
@themaherkhalil themaherkhalil deleted the mcp-ui-metadata branch January 27, 2026 15:47
@github-actions
Copy link
Copy Markdown

@CodiumAI-Agent /update_changelog

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add fields to mcp json meta to control UI and loading message

3 participants