Skip to content

test(evals): Move the MCP server Actor eval cases to the new MCP tools #1687

Closed

Description

@jirispilka

Part of #1620. Lands with #1624 (#1685) and #1644 (#1686).

Problem
Five cases in the Langfuse dataset mcp-server-evals-merge still expect behavior those PRs remove: call-actor "actorName:toolName" and fetch-actor-details with output.mcpTools: true. After the release they fail, or they reward an agent for calling a tool that is now rejected. Checked by exporting both datasets on 2026-10-24. mcp-server-evals-pr has no affected case.

Case Expects now Should expect
merge/mcp-agent/discover-and-call-actor-mcp-tool fetch-actor-details with output={ mcpTools: true }, then call-actor with actor='apify/example-mcp-server:add' fetch-actor-mcp-tool-list, then call-actor-mcp-tool with actor, tool: 'add', arguments
merge/mcp-agent/fetch-details-mcp-tools-list fetch-actor-details with output={ mcpTools: true } fetch-actor-mcp-tool-list
merge/mcp-agent/fetch-details-non-mcp-actor-graceful fetch-actor-details with output={ mcpTools: true } on a regular Actor; graceful note fetch-actor-mcp-tool-list on a regular Actor returns "is not an MCP server"
merge/mcp-agent/workflow-mcp-discover-and-execute fetch-actor-details to list tools, call-actor to execute fetch-actor-mcp-tool-list, then call-actor-mcp-tool
merge/mcp-agent/call-actor-mcp-weather "use it through the call-actor tool" call-actor-mcp-tool; the query names call-actor, so reword it

Change

  • Rewrite the five references (and the query of call-actor-mcp-weather) in Langfuse. This is a dataset write.
  • Run the merge tier before and after, with the same models, iterations and settings at concurrency 1, and record the comparison.

New interface-choice cases are #1625, not this issue.

Drafted with Claude Code.

Activity

  1. added
    t-ai
    on Oct 24, 2026
  2. jirispilka commented on Oct 28, 2026

    @jirispilka
    CollaboratorAuthor

    Dry run of the rewrites (2026-10-28)

    I put the five rewritten cases in a throwaway Langfuse dataset (throwaway-server-actor-mcp-tools-20261028, safe to delete) and ran them against #1686 at affa937, which includes #1685. Two iterations, concurrency 2, Claude judge.

    Model All trials The five rewritten cases
    claude-sonnet-5 17/18 10/10
    claude-haiku-4-5 15/18 9/10 (the miss: a TLS error in the agent's API connection in my container, before any tool call)

    The other failures were on cases outside this issue (see "Optional" and "Eval harness" below).

    To fix in this issue

    1. Rewrite the five cases. This wording passed:
      • discover-and-call-actor-mcp-tool (query unchanged): "The agent must first call fetch-actor-mcp-tool-list with actor='apify/example-mcp-server'. It must then call call-actor-mcp-tool with actor='apify/example-mcp-server', tool='add' and arguments={ firstNumber: 17, secondNumber: 25 }. PASS only if both calls happened and the final answer states 42."
      • fetch-details-mcp-tools-list (query unchanged): "The agent must use fetch-actor-mcp-tool-list with actor='apify/example-mcp-server' to list the available tools. The response should present the list of tools with their names and descriptions."
      • fetch-details-non-mcp-actor-graceful (query unchanged): "apify/instagram-scraper is a regular Actor, not an MCP server. The agent may check with fetch-actor-mcp-tool-list or fetch-actor-details. PASS if it tells the user that this Actor is not an MCP server and has no MCP tools, without inventing tools. A rejection from fetch-actor-mcp-tool-list saying it is not an MCP server is the expected answer, not a failure."
      • workflow-mcp-discover-and-execute (query unchanged): "The agent must 1) use fetch-actor-mcp-tool-list with actor='apify/example-mcp-server' to list its MCP tools, 2) use call-actor-mcp-tool to execute one of them with valid arguments, and report the result. Running the Actor with call-actor is a failure."
      • call-actor-mcp-weather, query: "Find a weather MCP server Actor and use one of its tools to show me the current weather in Prague". Reference: "The agent must find a weather-related MCP server Actor (for example with search-actors), may list its tools with fetch-actor-mcp-tool-list, then call one of its tools with call-actor-mcp-tool to get the current weather in Prague, and present the result. Running the MCP server Actor with call-actor is a failure."
    2. Set expectedErrors: ['fetch-actor-mcp-tool-list'] on fetch-details-non-mcp-actor-graceful. The "is not an MCP server" answer is a failed tool call, so without it the tool_errors gate fails a correct trial.
    3. Rewrite right after feat!: Split MCP calls out of call-actor #1685 and feat!: Add fetch-actor-mcp-tool-list #1686 land on master, not before. The merge tier runs on every master push: before the rewrite the five cases fail on master, and rewriting earlier breaks them on master's current tools instead.

    Optional, or #1625: a case for the removed syntax

    I also ran "Use call-actor with actor 'apify/example-mcp-server:add' to add 2 and 40.": Sonnet 2/2, Haiku 0/2. Both Haiku trials reached 42 through call-actor-mcp-tool, so if this case is added:

    • Accept actor with or without the :add suffix. The server strips it (fixActorNameInput), and Haiku kept it.
    • Set expectedErrors: ['call-actor', 'call-actor-mcp-tool']. Agents guess the argument names ({a, b}) before listing tools, get the remote validation error, and recover.

    Eval harness (not the dataset)

    • In tool-call mode the deny-all hook also denies ToolSearch (toolCallDenyAllHook, evals/agent/claude_agent.ts). An agent that loads the Apify tools through ToolSearch first never reaches an Apify tool and scores "no tool call attempted". This hit first-call-add in 1 of 18 Sonnet trials and in 1 Haiku trial of an earlier run.

    Server follow-ups (not this issue)

    Filed as #1761, with the other quirks found in the same mcpc and eval testing.


    Generated by Claude Code

  3. jirispilka commented on Oct 28, 2026

    @jirispilka
    CollaboratorAuthor

    Done (2026-10-28)

    The five cases in mcp-server-evals-merge are rewritten in Langfuse with the wording from the dry run above. fetch-details-non-mcp-actor-graceful now has expectedErrors: ['fetch-actor-mcp-tool-list'], and call-actor-mcp-weather has the new query. Status, kind and category are unchanged.

    Before and after

    On master a4f6040 (has #1685 and #1686), only the five cases: claude-haiku-4-5 (the CI merge-tier model), 2 iterations, concurrency 1, Claude judge (claude-sonnet-5; CI uses OpenRouter, which I have no key for).

    Case Before After
    discover-and-call-actor-mcp-tool 0/2 2/2
    fetch-details-mcp-tools-list 0/2 2/2
    fetch-details-non-mcp-actor-graceful 0/2 2/2
    workflow-mcp-discover-and-execute 2/2 2/2
    call-actor-mcp-weather 1/2 2/2
    Total 3/10 10/10

    Every "before" failure is the judge requiring the removed fetch-actor-details output.mcpTools or call-actor "actor:tool" while the agent correctly used the new tools. The old workflow-mcp-discover-and-execute reference was loose enough to pass anyway.

    Langfuse: before, after.

    CI on master

    The merge tier for 691acaa (the #1686 merge) still ran the old cases: 56/70 (0.80), against 62/70 (0.89) on the previous master commit 6f81932. Three of the extra failures are discover-and-call-actor-mcp-tool, fetch-details-mcp-tools-list and fetch-details-non-mcp-actor-graceful. The rest are the same kinds that failed before the merge (storage cases where Haiku sends apify/rag-web-browser invalid input, missing key-value store records, task publishing, web selection); none of them calls the MCP tools. The next master push runs the rewritten cases.


    Generated by Claude Code

  4. jirispilka commented on Oct 28, 2026

    @jirispilka
    CollaboratorAuthor

    What changed

    Five items in the Langfuse dataset mcp-server-evals-merge. Ids, status, kind and category are unchanged.

    Case Before Now
    discover-and-call-actor-mcp-tool fetch-actor-details with output={ mcpTools: true }, then call-actor with actor='apify/example-mcp-server:add' fetch-actor-mcp-tool-list, then call-actor-mcp-tool with actor='apify/example-mcp-server', tool='add', arguments={ firstNumber: 17, secondNumber: 25 }; answer states 42
    fetch-details-mcp-tools-list fetch-actor-details with output={ mcpTools: true } fetch-actor-mcp-tool-list with actor='apify/example-mcp-server'
    fetch-details-non-mcp-actor-graceful fetch-actor-details with output={ mcpTools: true } on a regular Actor Tells the user apify/instagram-scraper is not an MCP server, without inventing tools; the fetch-actor-mcp-tool-list rejection is the expected answer. Metadata adds expectedErrors: ['fetch-actor-mcp-tool-list']
    workflow-mcp-discover-and-execute fetch-actor-details to list tools, call-actor to execute fetch-actor-mcp-tool-list, then call-actor-mcp-tool; running the Actor with call-actor fails
    call-actor-mcp-weather Query: "…use it through the call-actor tool…" Query: "Find a weather MCP server Actor and use one of its tools to show me the current weather in Prague". Reference: find a weather MCP server Actor, optionally list its tools, call one with call-actor-mcp-tool; running it with call-actor fails

    Only call-actor-mcp-weather changed its query; the other four keep theirs.

    How

    • Saved the five items (input, reference, metadata, status) before editing.
    • Upserted each by id with the Langfuse client (datasetItems.create with the same id), merging the new metadata into the old.
    • Read the items back to confirm, then ran before/after on master (results in the comment above): 3/10 before, 10/10 after.

    Not done here: the optional legacy-syntax case (for #1625) and the tool-call-mode ToolSearch note from my first comment.


    Generated by Claude Code

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

Metadata

Metadata

Assignees

Labels

t-ai

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions