Skip to content

Commit c3de2a2

Browse files
authored
First Commit of Klavis Strata MCP (#305)
* First Commit of Klavis Strata MCP * Add auth header for Klavis MCP
1 parent de39956 commit c3de2a2

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"mcpServers": {
3+
"klavis-strata": {
4+
"url": "https://strata.klavis.ai/mcp/",
5+
"authorization": "Bearer ${KLAVIS_API_KEY}"
6+
}
7+
}
8+
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
from eval_protocol.models import EvaluateResult, EvaluationRow, Message
2+
from eval_protocol.pytest import AgentRolloutProcessor, evaluation_test
3+
4+
5+
@evaluation_test(
6+
input_messages=[
7+
[
8+
[
9+
Message(
10+
role="system",
11+
content=(
12+
"You are a helpful assistant that can answer questions about Gmail. You have access to tools to help you find information.\n"
13+
),
14+
),
15+
Message(
16+
role="user",
17+
content=("Find the first 5 emails title in my inbox."),
18+
),
19+
]
20+
]
21+
],
22+
rollout_processor=AgentRolloutProcessor(),
23+
completion_params=[{"model": "fireworks_ai/accounts/fireworks/models/kimi-k2-instruct"}],
24+
mode="pointwise",
25+
mcp_config_path="tests/pytest/mcp_configurations/klavis_strata_mcp.json",
26+
)
27+
def test_pytest_klavis_mcp(row: EvaluationRow) -> EvaluationRow:
28+
# filter for all tool calls
29+
tool_calls = [msg for msg in row.messages if msg.role == "tool"]
30+
if len(tool_calls) == 0:
31+
row.evaluation_result = EvaluateResult(
32+
score=0,
33+
reason="No tool calls made",
34+
)
35+
return row
36+
37+
row.evaluation_result = EvaluateResult(
38+
score=1,
39+
reason="At least one tool call was made",
40+
)
41+
return row

0 commit comments

Comments
 (0)