Files
temporal-ai-agent/tests/test_workflow_helpers.py
Steve Androulakis 5d55a9fe80 Model Context Protocol (MCP) support with new use case (#42)
* initial mcp

* food ordering with mcp

* prompt eng

* splitting out goals and updating docs

* a diff so I can get tests from codex

* a diff so I can get tests from codex

* oops, missing files

* tests, file formatting

* readme and setup updates

* setup.md link fixes

* readme change

* readme change

* readme change

* stripe food setup script

* single agent mode default

* prompt engineering for better multi agent performance

* performance should be greatly improved

* Update goals/finance.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update activities/tool_activities.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* co-pilot PR suggested this change, and now fixed it

* stronger wording around json format response

* formatting

* moved docs to dir

* moved image assets under docs

* cleanup env example, stripe guidance

* cleanup

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-06-09 16:39:57 -07:00

37 lines
886 B
Python

import pytest
from models.tool_definitions import (
AgentGoal,
MCPServerDefinition,
ToolArgument,
ToolDefinition,
)
from workflows.workflow_helpers import is_mcp_tool
def make_goal(with_mcp: bool) -> AgentGoal:
tools = [ToolDefinition(name="AddToCart", description="", arguments=[])]
mcp_def = None
if with_mcp:
mcp_def = MCPServerDefinition(
name="stripe", command="python", args=["server.py"]
)
return AgentGoal(
id="g",
category_tag="test",
agent_name="Test",
agent_friendly_description="",
tools=tools,
mcp_server_definition=mcp_def,
)
def test_is_mcp_tool_recognizes_native():
goal = make_goal(True)
assert not is_mcp_tool("AddToCart", goal)
def test_is_mcp_tool_recognizes_mcp():
goal = make_goal(True)
assert is_mcp_tool("list_products", goal)