Ask
276
@maren_dowd ·

40 tools on one mcp server or split into five, schemas eat 11k tokens tool-schema

Internal agent for our ops team. It has grown to 40 tools across four domains - deploys, tickets, the data warehouse, and a pile of one-off scripts. Counting the definitions alone, that is about 11,400 tokens attached to every single step, before any conversation.

Two options on the table: leave it as one server and accept the overhead, or split into five servers and attach only the ones a given task needs.

The constraint is not really the money - prompt caching handles most of that - it is that accuracy has clearly got worse as we added tools. Wrong-tool picks went up as we passed about 25. Chart of the token side attached.

10 answers Share
Report

Answering anonymously — a moderator will review it first.

  • @onebag_ozzy · 4w ago · 3 replies

    Split, but not into five servers - into task-shaped tool sets, which is a different axis. Servers are a deployment detail; what the model sees is one flat list, and it does not care which process a tool came from.

    What worked for us at a similar size:

    • a small router step that picks a tool set from the user's request before the main loop starts. One cheap call, one enum output, no tools attached. It picks deploys or warehouse and the main loop gets 8 tools instead of 40.
    • a load_tools(domain) escape hatch for the 5% of requests that cross domains, so the router being wrong is recoverable rather than fatal.
    • ruthless deduplication first. Of your 40, I would bet 12 are variations that could be one tool with an enum parameter. restart_service, restart_worker and restart_all are one tool.

    You have already found the thing that matters, which is that the accuracy curve turns before the cost curve does. Caching makes 40 tools affordable and does nothing about the model reading 40 similar descriptions and picking the fourth-best one.

    231
    Share
    Reply

    Answering anonymously — a moderator will review it first.

    Report
    • @onebag_ozzy · 4w ago

      Do the consolidation first and re-measure before building the router. Going from 40 tools to 26 by merging near-duplicates fixed most of the wrong-tool picks for us, and the router turned out to be worth maybe another 3 points on top. Cheap thing first.

      74
      Share
      Reply

      Answering anonymously — a moderator will review it first.

      Report
    • @maren_dowd · 4w ago

      The router-then-load approach is more moving parts than I wanted, but the enum consolidation is free and I can do it this week. We definitely have three restart tools.

      62
      Share
      Reply

      Answering anonymously — a moderator will review it first.

      Report
  • @listening_lane · 4w ago · 3 replies

    You need an eval set before you change anything, or you are going to be arguing about vibes for a month. Take 80 real requests from your logs, label the tool that should have been called first, and run the whole set on any candidate configuration. It is an afternoon of work and it turns "accuracy has clearly got worse" into a number that either moves or does not.

    We found the biggest single win was not the count at all - it was rewriting descriptions so each one said when not to use the tool. Nine of ours started with almost the same sentence.

    148
    Share
    Reply

    Answering anonymously — a moderator will review it first.

    Report
    • @listening_lane · 4w ago

      Allow a set rather than a single answer. The label is "any of these tools is acceptable first", and the metric is whether the pick was in the set. The ambiguous fifth stops being noise and you also get a free list of the places where your tool boundaries are wrong, because genuinely ambiguous usually means two tools that should be one.

      67
      Share
      Reply

      Answering anonymously — a moderator will review it first.

      Report
    • @maren_dowd · 4w ago

      How did you label the expected tool for requests where a human would reasonably pick either of two? About a fifth of ours are genuinely ambiguous and I do not want to bake my own opinion in as ground truth.

      54
      Share
      Reply

      Answering anonymously — a moderator will review it first.

      Report
  • @adjunct_ora · 4w ago

    Second the descriptions point, and add: name them so a stranger could sort them into piles. warehouse_run_query and tickets_search beat run_query and search by a distance, because the prefix carries domain information into every mention of the tool in the transcript, not just into the definition block.

    Costs you nothing, no architecture, and it shows up immediately in the wrong-tool rate.

    96
    Share
    Reply

    Answering anonymously — a moderator will review it first.

    Report
  • @schema_drift_lu · 4w ago

    One caution on aggressive dynamic loading: if a tool is not attached when the model needs it, you get a very confident hallucinated answer instead of a tool call, and that failure is much harder to spot in your logs than a wrong-tool pick. Whatever router you build, make sure the model can say "I need the deploys tools" and get them, and log every time it asks.

    68
    Share
    Reply

    Answering anonymously — a moderator will review it first.

    Report
  • @two_hills_up · 4w ago

    Also worth asking which of the 40 an ops person has ever actually needed the agent for. We audited a year of runs and 6 tools covered 84% of successful sessions. The tail was not adding capability, it was adding candidates.

    33
    Share
    Reply

    Answering anonymously — a moderator will review it first.

    Report
  • @crimp_not_solder · 4w ago

    The 11,400 number is worth breaking down before you optimise it. Ours was 9k and about 3.5k of that was two tools with enormous nested parameter objects for filters nobody used. Trimmed those two schemas to the four fields that get set in practice and the whole budget dropped by a third without removing a single tool.

    51
    Share
    Reply

    Answering anonymously — a moderator will review it first.

    Report