paperclipai/paperclip · error · ToolGatewayHttpError
local_stdio_template_missing
local_stdio_template_missing
Error message
Local stdio MCP connection requires an approved templateId
What it means
Guard for local stdio MCP execution: the connection has no approved templateId (blank after trim), meaning no board-approved command template is bound to this connection. Local stdio processes may only launch from approved templates, so the call is rejected until an operator sets an approved template on the connection.
Source
Thrown at server/src/services/tool-gateway.ts:2672
updatedAt: now,
})
.where(eq(toolConnections.id, connection.id));
}
function grantRefForCredential(
grant: typeof connectionGrants.$inferSelect,
ref: McpConnectionCredentialRef,
): ToolCredentialSecretRef | undefined {
return grant.credentialSecretRefs.find((candidate) =>
candidate.configPath === ref.name || candidate.configPath === `credentials.${ref.name}`,
);
}
async function resolveGrantSecretValue(
session: ToolGatewaySession,
connection: typeof toolConnections.$inferSelect,
grant: typeof connectionGrants.$inferSelect,
ref: ToolCredentialSecretRef,
configPath = ref.configPath,
): Promise<string> {
const accessContext = {
consumerType: "tool_connection" as const,
consumerId: connection.id,
configPath,
actorType: "system" as const,
actorId: session.agentId,
responsibleUserId: grant.subjectUserId,
issueId: session.issueId,
heartbeatRunId: session.runId,
};
if (grant.kind !== "user") {
return secrets.resolveSecretValue(
connection.companyId,
ref.secretId,
ref.versionSelector ?? "latest",
{ accessContext },View on GitHub (pinned to 01ad858492)
Solutions
- Set an approved templateId on the local stdio MCP connection; unreviewed local commands are not allowed.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at server/src/services/tool-gateway.ts:2576 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of paperclipai/paperclip@01ad858492 (2026-08-18).
Data as JSON: /api/errors/bef883ef2108ee22.
Report an issue: GitHub.