Skip to content

chore: Adding MCP decorators#294

Merged
gavin-aguiar merged 5 commits into
devfrom
gaaguiar/mcp_decorator
Aug 28, 2025
Merged

chore: Adding MCP decorators#294
gavin-aguiar merged 5 commits into
devfrom
gaaguiar/mcp_decorator

Conversation

@gavin-aguiar

@gavin-aguiar gavin-aguiar commented Aug 19, 2025

Copy link
Copy Markdown
Collaborator

Added new decorators for mcp extensions

Sample code:

@app.mcp_tool_trigger(
    arg_name="context",
    type="mcpToolTrigger",
    tool_name="hello_mcp",
    description="Hello world.",
    toolProperties="[]",
)
def hello_mcp(context) -> None:
    return "Hello I am MCPTool!"

@gavin-aguiar gavin-aguiar changed the title Adding MCP decorators chore: Adding MCP decorators Aug 19, 2025
@gavin-aguiar
gavin-aguiar marked this pull request as ready for review August 28, 2025 17:22
@gavin-aguiar
gavin-aguiar merged commit 99832f3 into dev Aug 28, 2025
16 checks passed
@gavin-aguiar
gavin-aguiar deleted the gaaguiar/mcp_decorator branch August 28, 2025 18:34
name=arg_name,
tool_name=tool_name,
description=description,
tool_properties=tool_properties,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How this toolProperties will support the PropertyeName, PropertyValue, Required parameter?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to https://github.com/Azure-Samples/remote-mcp-functions-python/blob/main/src/function_app.py#L14

User defines a ToolProperty and that is assigned to this tool_properties

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.

3 participants