n8n_get_credential
Retrieve metadata for a specific credential in n8n workflow automation, including ID, name, type, and timestamps, without exposing sensitive data.
Instructions
Get details of a specific credential (without sensitive data).
Args:
id (string): Credential ID
Returns: Credential metadata (id, name, type, timestamps). ⚠️ Credential data/secrets are NOT returned for security.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The unique identifier of the resource |
Implementation Reference
- src/tools/credentials.ts:76-105 (handler)Implementation of the 'n8n_get_credential' tool handler.
// ============ Get Credential ============ server.registerTool( 'n8n_get_credential', { title: 'Get n8n Credential', description: `Get details of a specific credential (without sensitive data). Args: - id (string): Credential ID Returns: Credential metadata (id, name, type, timestamps). ⚠️ Credential data/secrets are NOT returned for security.`, inputSchema: IdParamSchema, annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false } }, async (params: z.infer<typeof IdParamSchema>) => { const credential = await get<N8nCredential>(`/credentials/${params.id}`); return { content: [{ type: 'text', text: formatCredential(credential) }], structuredContent: credential }; } );