yaver_openrouter_integrate
Deterministically add a secure, cost-bounded OpenRouter chat seam to an Expo + Convex app. Detects either the Yaver starter-session boundary or standard Convex auth, refuses an unauthenticated paid proxy, keeps OPENROUTER_API_KEY server-only, restricts browser CORS to APP_URL, passes SSE through ...
This record as markdown: /tools/io-github-kivanccakmak-yaver/yaver-openrouter-integrate.md
What yaver_openrouter_integrate does on Yaver
AI agents use yaver_openrouter_integrate to create or update resources in Yaver, usually the action step of a workflow, after the agent has gathered context. Every call changes real data in your Yaver environment.
| Parameter | Type | Required | Description |
|---|---|---|---|
auth_mode | string | — | Default auto. An explicit mode is still validated against actual auth wiring. |
directory | string | Yes | Explicit project or monorepo root. Auto-detects backend/convex or convex and an Expo root at ., apps/mobile, or mobile. |
convex_directory | string | — | Optional path relative to directory when Convex layout is nonstandard or detection is ambiguous. |
mobile_directory | string | — | Optional Expo root relative to directory when layout is nonstandard or detection is ambiguous. |
include_mobile_client | boolean | — | Default true. Write yaver/openRouterChat.ts beneath the detected Expo root for native/RN-web SSE consumption. |
Parameters from the server's own tool schema.
Why yaver_openrouter_integrate is rated Medium
Creates/modifies app configuration, environment variables, and source code files reversibly with security guardrails intact.
From the tool's definition add secure cost-bounded OpenRouter chat seam, writes React Native stream client, returns changed files env keys
Risk signalsAccepts file system path (directory)
Attacks that exploit this kind of access
The rule that runs yaver_openrouter_integrate safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Yaver, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For yaver_openrouter_integrate, this is the rule to start with:
yaver_openrouter_integrate stays usable, but capped: an agent stuck in a loop can't make hundreds of changes a minute. Everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect Yaver, apply this rule, and every yaver_openrouter_integrate call is checked against it from then on.
Questions about yaver_openrouter_integrate
Deterministically add a secure, cost-bounded OpenRouter chat seam to an Expo + Convex app. Detects either the Yaver starter-session boundary or standard Convex auth, refuses an unauthenticated paid proxy, keeps OPENROUTER_API_KEY server-only, restricts browser CORS to APP_URL, passes SSE through without one database write per token, and optionally writes a React Native stream client. Idempotent; returns exact changed files, env keys, security contract, and next prompts for domain-aware chat or image diagnosis. It is categorised as a Write tool in the Yaver MCP Server, which means it can create or modify data. Consider rate limits to prevent runaway writes.
yaver_openrouter_integrate accepts 5 parameters: auth_mode, directory, convex_directory, mobile_directory, include_mobile_client. Required: directory. The full parameter table on this page comes from the server's own tool schema.
Register the Yaver MCP server in PolicyLayer and add a rule for yaver_openrouter_integrate: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Yaver. Nothing to install.
yaver_openrouter_integrate is a Write tool with medium risk. Write tools should be rate-limited to prevent accidental bulk modifications.
Yes. Add a rate_limit block to the yaver_openrouter_integrate rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for yaver_openrouter_integrate. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
yaver_openrouter_integrate is provided by the Yaver MCP server (yaver-cli). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on Yaver, and thousands of servers like it.
This server
Across the catalogue