mirror of
https://github.com/temporal-community/temporal-ai-agent.git
synced 2026-03-15 14:08:08 +01:00
* 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>
37 lines
886 B
Python
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)
|