You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ai-firstReduces friction for AI agents authoring URLCode projectsenhancementNew feature or requestextensionInvolves an extension or companion package (store, ui, auth, admin)
Tool, resource and prompt handlers run through loadExtensionHooks, which calls the export as fn(input) (dist/extensions.js), so a handler only receives the validated arguments. A real tool server also needs:
Route env bindings. urlcode-ai's tools read MCP_ENABLED_SKILLS (the skills visible to skills_list/skills_get), FEEDBACK_TABLE_NAME and AWS_REGION. These are policy-granted, revision-pinned route bindings on a function route. A handler could read process.env, but that skips the operator-grant model the function route enforces.
A request id, to correlate per-tool usage and audit events with the request log. Today onToolError is the only operator hook, and it only fires on failure, so success, latency and tool-error telemetry isn't possible.
Env-dependent tool schemas.skills_get.id is an enum of the enabled skills, which comes from an env binding. In YAML it would have to be copied by hand and kept in sync with the env value.
Proposed behavior and alternatives
Call tool, resource and prompt handlers as handler(args, context), where context has at least the mount's granted env, a requestId, and the server/tool names. Keep the first argument unchanged so existing handlers keep working.
Add an onToolCall({server, tool, kind, outcome, durationMs, requestId}) host callback next to onToolError, so operators can emit usage events without wrapping each handler.
Allow env bindings on an extension: mcp route (or on the server config) that are granted by the operator policy the same way function-route bindings are.
ai-firstReduces friction for AI agents authoring URLCode projectsenhancementNew feature or requestextensionInvolves an extension or companion package (store, ui, auth, admin)
Activity
Give extension requests and hooks a request context (env, request id)