Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat(mcp): expose provider usage limits to agents #28212

Closedryoppippi(GitHub profile, opens in a new tab)wants to merge 8 commits intomain fromrefs/pull/28212/headopened View on GitHub

Showing 12 changed files with 150 additions and 0 deletions (loading 9).

x
0 of 12 viewed, 12 left
17 additions and 0 deletionsapps/server/src/mcp/toolkits/orchestrator/handlers.tsModified
View file
@@ -19,6 +19,23 @@
return yield* service.capabilities(scope, input);
}),
),
+ orchestrator_usage_limits: McpToolAccess.reads((input) =>
+ Effect.gen(function* () {
+ const scope = yield* McpInvocationContext.McpInvocationContext;
+ const target = PeerForwarding.remoteTarget(scope, input.environmentId);
+ if (target !== undefined) {
+ const forwarding = yield* PeerForwarding.PeerForwarding;
+ return yield* forwarding.call(
+ scope,
+ OrchestratorToolkit.tools.orchestrator_usage_limits,
+ target,
+ input,
+ );
+ }
+ const service = yield* OrchestratorMcpService.OrchestratorMcpService;
+ return yield* service.usageLimits(scope);
+ }),
+ ),
delegate_task: McpToolAccess.actsAsCaller((input) =>
Effect.gen(function* () {
const scope = yield* McpInvocationContext.McpInvocationContext;
17 additions and 0 deletionsapps/server/src/mcp/toolkits/orchestrator/tools.tsModified
View file
@@ -1,6 +1,8 @@
import {
OrchestratorMcpCapabilitiesInput,