clerk.create_session_token
Create a session token (JWT) for an active session in a connected Clerk application. Optionally pass template_name to create the token from a named JWT template. Sensitive — the returned JWT grants access on behalf of the user; do not log or expose it. Call clerk.get_connected_accounts first. Pas...
This record as markdown: /tools/io-github-vee3io-vee3/clerk.create-session-token.md
What clerk.create_session_token does on Vee3
AI agents invoke clerk.create_session_token to trigger actions in Vee3. What it does depends on the arguments the agent supplies, and its effects often reach beyond the immediate call: builds kicked off, notifications sent, workflows started.
| Parameter | Type | Required | Description |
|---|---|---|---|
session_id | string | Yes | Clerk session id (sess_...) to retrieve or modify. |
template_name | object | — | Optional JWT template name. When set, the session token is created from that template. |
clerk_instance_id | object | — | Clerk instance id (ins_...) from clerk.get_connected_accounts. Omit to use the default connected account. |
Parameters from the server's own tool schema.
Why clerk.create_session_token is rated High
Creates authentication tokens that grant user-level access, enabling impersonation or unauthorized access.
From the tool's definition JWT grants access on behalf of the user; do not log or expose
Attacks that exploit this kind of access
The rule that runs clerk.create_session_token safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Vee3, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For clerk.create_session_token, this is the rule to start with:
clerk.create_session_token stays usable, but rate-capped: a runaway agent can't fire it dozens of times a minute. Everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect Vee3, apply this rule, and every clerk.create_session_token call is checked against it from then on.
Questions about clerk.create_session_token
Create a session token (JWT) for an active session in a connected Clerk application. Optionally pass template_name to create the token from a named JWT template. Sensitive — the returned JWT grants access on behalf of the user; do not log or expose it. Call clerk.get_connected_accounts first. Pass clerk_instance_id to target a specific connection, or omit it to use the default account. Returns a jwt field containing the signed token. Cost = 10 tokens. It is categorised as a Execute tool in the Vee3 MCP Server, which means it can trigger actions or run processes. Use rate limits and argument validation.
clerk.create_session_token accepts 3 parameters: session_id, template_name, clerk_instance_id. Required: session_id. The full parameter table on this page comes from the server's own tool schema.
Register the Vee3 MCP server in PolicyLayer and add a rule for clerk.create_session_token: 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 Vee3. Nothing to install.
clerk.create_session_token is a Execute tool with high risk. Execute tools should be rate-limited and have argument validation enabled.
Yes. Add a rate_limit block to the clerk.create_session_token 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 clerk.create_session_token. 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.
clerk.create_session_token is provided by the Vee3 MCP server (https://mcp.vee3.io/mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on Vee3, and thousands of servers like it.
This server
Across the catalogue