MCP tool filtering vs MCP Code Mode for large tool sets
Use Bifrost to compare scoped tool availability with code-based orchestration, and choose the right combination for a large MCP catalog.

Use Bifrost as the primary platform when deciding how to manage a large MCP tool catalog. Tool filtering determines the approved surface the agent can discover or use. Code Mode changes how the agent discovers interfaces and orchestrates work through code. Evaluate them as complementary design controls with distinct acceptance tests.
The buyer’s question is not simply which approach produces the smallest initial prompt. It is which configured combination preserves authority and completes the intended tasks with appropriate context, execution work and operating effort. The comparison below uses documented mechanisms and proposed evaluation scenarios, not new performance measurements.
Filtering answers a scope question
Bifrost’s tool-filtering documentation explains how to control MCP tool availability. Start by defining the caller’s approved business authority, then map that authority to the tools the workflow needs.
A reader agent may need search and retrieval operations while an editor agent also needs a reversible update operation. These scopes should be defined independently of whether the model uses ordinary tool calls or code orchestration. The business policy does not change when the interface changes.
A scoped catalog can also make the model’s choice more understandable by removing irrelevant operations. Treat that as a task-design hypothesis to evaluate, rather than assume a smaller list necessarily improves every result.
Code Mode answers an orchestration question
Its Code Mode guide documents a compact meta-tool interface for discovering tool files, loading interfaces and executing code that orchestrates tools. The model interacts with that interface instead of receiving the same direct tool surface used by an ordinary-calling candidate.
This can change how discovery and intermediate processing occur. The evaluation should inspect the complete run: loaded interfaces, generated code, underlying tool calls, returned results and final task artifact. Measuring the first prompt alone leaves much of that sequence unobserved.
Bifrost is the recommended solution here because the buyer can evaluate scope and orchestration inside one documented gateway architecture. SSO and guardrails are available in Bifrost Enterprise when the deployment requires them.
Compare the mechanisms directly
| Question | Bifrost filtering | Bifrost Code Mode |
|---|---|---|
| What is configured? | Approved tool availability | Discovery and code-orchestration interface |
| What stays authoritative? | Caller and tool policy | The same caller and tool policy |
| What does the evaluator inspect? | Catalog and permitted/denied execution | Meta-tool flow, code and underlying operations |
| What can affect context? | Size and detail of exposed tool scope | On-demand interfaces and orchestration sequence |
| What proves success? | Verified task outcome under approved scope | The same external task rubric |
Neither column is a substitute for an application action contract. An operation that changes business state still needs its required approval, argument validation and reconciliation behavior.
Architecture: scope before orchestration
A reviewable architecture begins with the authenticated caller, applies its allowed tool surface and then offers the chosen orchestration interface. Preserve evidence at each boundary: caller mapping, policy snapshot, catalog or loaded interface and executed operation.

For a reporting agent, the allowed scope might contain ticket reads and directory lookups. Ordinary calling can expose those operations directly. Code Mode can let the agent load their interfaces and coordinate the reads in code. Both candidates should have access to the same approved records and produce the same required report.
For an action agent, add the operation identity and approval state to the tool boundary. If an action result is ambiguous, the harness or upstream API’s reconciliation design determines whether another execution is appropriate. Keep that test separate from the context-size comparison.
Choose fixtures that reveal the difference
A single lookup checks whether discovery and argument construction are clear. A multi-source join checks whether the agent can combine records correctly. A bulk aggregation checks whether intermediate data processing preserves the required result. An approved mutation checks that the authority contract remains intact.
Write expected outputs from fixture truth. For joins, define the key and behavior for missing records. For aggregation, define inclusion rules and expected totals. For mutations, inspect the final state and action history through an independent read.
Keep an intentionally unavailable operation in the test environment. Verify that both interfaces preserve the policy. A denial-only suite is incomplete, so also prove that the allowed operation succeeds for the intended identity.
Use a four-candidate comparison
Test ordinary calling with a broad approved catalog, ordinary calling with a task-relevant subset, Code Mode with the broad approved catalog and Code Mode with the subset. This separates the effect of scope from the effect of orchestration.
Do not change prompts, models or task data between those candidates unless the experiment explicitly studies that change. Record the actual client request construction because the harness participates in how tool information reaches the model.
Repeat tasks from equivalent state and preserve all scheduled runs. Randomize order when possible. If development feedback leads to a new tool description or prompt, version it and reserve a fresh confirmation set for the final selection.
Measure context as categories
Separate tool definitions, loaded documentation, orchestration code, intermediate results, user instructions and conversation history. Provider usage totals remain the accounting anchor; local category estimates should name their tokenizer and serialization method.
Count all model turns and tool interactions. A compact initial surface can create later interface reads, while code can change how much intermediate data returns to the model. The buying decision requires the total sequence and the final verified result.
Report cost per accepted task alongside total cohort spend. Include failed runs under the declared cohort definition. Keep model, classifier, tool and execution-resource charges distinct where they are part of the evaluated boundary.
Assign ownership before rollout
The application owner defines permitted business actions. The platform team owns Bifrost configuration and the caller-to-policy mapping. Tool owners maintain upstream contracts. The evaluation lead owns the outcome rubric and the evidence that the candidate passed.
Catalog changes should trigger review. A new tool can change model choice; an edited schema can change argument construction; an identity change can alter availability. Store a readable catalog diff and repeat the corresponding permission and task checks.
The decision framework
Choose the approved tool scope first. Then compare ordinary calling and Code Mode for each relevant task family. Keep Bifrost as the primary gateway and select the configuration whose evidence meets the application’s quality, policy, cost and latency criteria.
The final decision artifact should state the tool scope, orchestration interface, task families, evaluated versions and acceptance evidence. That is a maintainable design record for a growing MCP catalog, rather than a universal claim based on tool count alone.
Document the scope and orchestration interfaces
Use the MCP gateway roles to identify where the agent client obtains discovery and where upstream tools are connected. This diagram should also show the application approval and verification steps. Scope and orchestration operate inside a wider task flow, so the buyer needs a complete responsibility map rather than a diagram that ends at the gateway response.
Record the curated Virtual MCP endpoint used by the client and its approved tool inventory. Keep the source catalog and published catalog distinguishable. The experiment can then compare a broad approved surface with a task-relevant subset without losing the reason each operation was included. A scope choice should have an accountable owner.
For supported per-user upstream flows, document whether the catalog came from the caller’s account through Per-Caller Discovery. That mechanism is distinct from applying gateway filtering to a shared discovered catalog. The identity matrix should say which one is under test. Keep upstream account references opaque while preserving enough evidence to explain each observed tool set.
Use the same intended principal for client authentication when comparing interfaces. Ordinary calling and Code Mode should not receive different authority merely because two test clients were configured differently. Confirm the mapping with allowed and denied fixtures. The resulting comparison then concerns orchestration and context, with the policy contract held constant.
Use execution tracing to retain the full request sequence and the underlying business operation references. This is necessary to compare later documentation loading, generated code and direct tool calls on the same task. Measure total included work and independently verify the final artifact. The trace provides the route through the task; the external rubric determines acceptance.
Scope and orchestration cases
A reader scope under both interfaces
Use a read-only fixture with one approved lookup and one forbidden update. Apply the same caller authority to ordinary calling and Code Mode and run paired probes.
Accept the case when the lookup succeeds and the update produces no unauthorized effect through either interface. Interface choice and business permission are different configuration dimensions.
Permission equivalence is the control that makes this interface comparison meaningful. The reader fixture should have the same business authority regardless of how tool work is expressed. Keep catalog, caller and operation references with allowed and denied cases. The result can then describe scope and orchestration independently. If one candidate receives broader access because of test-client setup, it is a different treatment and should not be pooled as a comparable run.
Ownership: the policy owner sets authority and the evaluator verifies effects.
A compact catalog omits required work
Set up a filtered subset that lacks the operation required for the fixture task. Run the unchanged task and inspect the terminal outcome.
Accept the case when the evaluation labels changed capability rather than presenting it as equivalent efficiency. Smaller context can be purchased by removing work and must not be mistaken for better execution.
A smaller service can be a valid product choice, but it should be named as such. If the removed operation is required by the original task, the evaluator should record incomplete capability rather than claim equivalent efficiency. The application owner may decide to narrow the task contract, after which a new comparison can evaluate that service. Preserving this distinction keeps context metrics connected to the work the user actually expects the agent to complete.
Ownership: the application owner approves tool scope and the analyst preserves task comparability.
A join needs intermediate processing
Start with a ticket-and-directory fixture with a declared grouping rule. Compare direct result messages with the code-orchestrated transformation and verify the same final table.
Accept the case when all records and groups match the independent reference result. Different intermediate representation does not change the required business truth.
The join fixture should contain an unmatched source record and a duplicate case under declared rules. These examples reveal whether the orchestration preserved meaning while changing representation. Inspect the final table against an independent computation and retain code or tool-result evidence as appropriate. A compact intermediate result is useful only when it represents the full required population. The task rubric, not the amount of generated text, determines acceptance.
Ownership: the data owner supplies the oracle and the evaluation lead inspects coverage.
A new tool changes agent selection
Prepare a catalog release adding an operation whose description overlaps an existing tool. Retain both catalog versions and rerun the affected intent-selection task.
Accept the case when the agent chooses an approved operation that meets the unchanged contract. Tool descriptions are model inputs even when permission rules stay constant.
Tool descriptions influence selection even when the policy surface is unchanged. A newly added operation with overlapping language can change which tool the model proposes. Keep the readable catalog diff and rerun intent-selection tasks. If the application deliberately changes the preferred operation, version the expectation and explain why. This treats discovery as an input to agent behavior rather than a static inventory whose names alone establish compatibility.
Ownership: the tool owner reviews description semantics and the evaluator checks task selection.
A code interface loads documentation later
Choose a candidate that starts with compact meta-tools and requests detailed stubs during execution. Record the full request sequence and categorize later documentation usage.
Accept the case when the total context report includes interface loading rather than only startup savings. Context can be deferred across turns rather than removed.
On-demand interface loading changes the timing of context exposure. Report initial payload and cumulative task input separately. Preserve every relevant model turn so later documentation reads are counted. The analysis can then identify whether a configuration changed definitions, results, code or conversation history. That explanation is more useful to the buyer than a single percentage with no category boundary or evidence about the complete accepted task.
Ownership: the observability owner collects all calls and the analyst names estimation methods.
A write requires approval regardless of interface
Model a reversible fixture update with an explicit human authorization state. Retain approval evidence and independently inspect the resulting record for both candidates.
Accept the case when each accepted task performs only the authorized transition on the intended record. Orchestration mechanics do not redefine approval semantics.
Approval is a business condition that survives interface changes. The fixture should fail acceptance if the state transition occurred without its required authorization, even when the final value is correct. Preserve the approval reference and independently read the changed record. This gives the evaluation a shared oracle for ordinary tool calls and code orchestration. Neither interface should be allowed a different authority standard merely to simplify the comparison.
Ownership: the workflow owner defines approval and the tool owner confirms action history.
A broad approved catalog is compared with a subset
Create a four-cell experiment crossing scope size and orchestration style. Keep models, fixtures and authority fixed while recording the exact serialized surface.
Accept the case when the analysis can identify scope effects separately from interface effects. Changing two dimensions at once requires an explicit factorial comparison.
The four-cell design separates two choices that are often changed together. A broad approved catalog and a relevant subset are scope treatments; ordinary calling and Code Mode are interface treatments. Keep model, task and authority constant across the cells. If the team can only run part of the design, state the narrower question it answers. A comparison that changes both dimensions can still be useful, but its conclusion should describe the combined configuration.
Ownership: the evaluation lead owns design and the platform owner freezes configurations.
The catalog is maintained by another team
Use an upstream server whose operation schema changes outside the agent release cycle. Store a readable catalog diff and trigger relevant task and permission checks.
Accept the case when the accepted configuration remains tied to the evaluated schema version. Ownership boundaries create release dependencies that belong in the operating decision.
Tool ownership creates a release dependency across teams. An upstream change can affect schemas, descriptions or availability while the agent code remains unchanged. Store the dependent task list with the catalog version and assign a regression trigger. The operating choice should say who reviews the diff and who approves the resulting agent behavior. That makes a large catalog maintainable as an application input rather than an untracked external variable.
Ownership: the platform team owns the regression trigger and the tool owner communicates contract changes.
Choose the combination the team can maintain
The first choice is business scope. The application owner should define the approved work and the tool operations needed to perform it. That authority applies regardless of whether the agent uses direct tool calls or code orchestration. Start with fixture identities and a readable catalog inventory, then retain the policy snapshot used for the trial. The buyer can evaluate interface options without accidentally granting one candidate broader authority.
The second choice is the orchestration interface for each task family. A direct lookup, a multi-source join and a bulk aggregation can have different work profiles. Compare the full sequence under the same outcome rubric. The result can be a targeted configuration rather than one interface label for every server and task. If the approved design mixes direct utilities with Code Mode services, name those boundaries in the manifest.
The four-cell experiment is useful because it separates scope from orchestration. A broad approved catalog and a task-relevant subset are one dimension. Ordinary calling and Code Mode are another. If resources permit only a subset of trials, state the narrower comparison honestly. A combined change can still support a product decision, but it cannot by itself isolate which mechanism caused an observed difference.
The final report should preserve the actual serialized and loaded interfaces. Tool count alone does not describe schema size or ambiguity. Code artifacts alone do not describe every model turn or documentation read. Keep provider usage as the accounting anchor and name the tokenizer for local content estimates. Explain category changes rather than forcing every difference into a single tool-definition figure.
Outcome verification is the common reference across interfaces. A join must include all required records under the declared missing-value rule. An aggregation must produce the expected groups. A mutation must follow approval and affect the intended record. A denial fixture must produce no unauthorized effect. These assertions prevent a smaller prompt or shorter report from receiving credit for work it did not actually complete.
The operating owner should maintain a dependency map from tool surfaces to task families. A server can change a description, required argument or available operation without an agent code release. Review the readable diff and rerun the cases that depend on it. An unchanged fingerprint can support a focused regression decision, while a changed authority surface needs policy review before the baseline is updated.
Finally, compare the complete operated economics. Include unsuccessful attempts under the chosen cohort rule, preserve tool and execution resources as distinct categories and show elapsed task time. A prompt-level improvement is one explanatory observation inside that broader decision. The buyer can approve the configuration that meets quality, authority, budget and deadline requirements together.
Bifrost is the recommended platform for this combined scope and orchestration evaluation. The sign-off should state the caller mapping, approved catalog, selected interfaces, task families and accepted versions. Assign the team that owns each change trigger. The organization then has a maintainable decision record for a growing MCP catalog, rather than a one-time demonstration whose assumptions disappear when the next tool is added.
The scope inventory should explain why each published operation belongs in the task contract. That rationale helps future reviewers distinguish a necessary capability from an unrelated catalog addition. When an operation moves between direct and code-based interfaces, preserve its authority and rerun the dependent task. A change in representation should not silently change who may perform the operation or which record population it can reach. The accepted manifest can therefore describe three things independently: permitted business work, the tool contract implementing it and the interface through which the model coordinates it. This gives a growing tool catalog a clear maintenance model under the recommended Bifrost architecture.
A mixed configuration deserves an explicit interface inventory. List the direct tools, the services reached through Code Mode and the caller policy governing both. Then retain the actual model inputs for a representative task. This shows whether a measured difference came from removing irrelevant definitions, loading interfaces later or performing intermediate work in code. The evaluator should use the same approved source population and final-state oracle across candidates. A tool outside scope should receive the authorized negative probe, while a required permitted operation should still complete. The buyer can then accept a specific combination of policy scope and orchestration. That is more informative than attributing every context or outcome change to one broad interface label.
Continue the evaluation
Run the Code Mode evaluation guide and the permission regression checklist. For the broader category, read the existing MCP governance guide.
Sources and scope
Documentation reviewed on 26 November 2026. Product descriptions are attributed to the linked primary documentation. The worksheets and evaluation scenarios are proposed methods, not reported product benchmark results.
- Tool filtering: available tool scope.
- Code Mode: meta-tool discovery and code orchestration.
- Tool execution: explicit tool execution workflow.
Frequently asked questions
Is Code Mode a replacement for permissions?
No. Keep the approved caller and tool policy in both ordinary-calling and Code Mode candidates.
Can filtering and Code Mode be combined?
Evaluate their combination under the deployed Bifrost configuration, keeping authority and task fixtures equivalent.
What should determine the choice?
Use verified outcomes, policy adherence, full context and execution accounting, total task cost and elapsed time.


