Skip to main content
Glama
Keycloak MCP Server

Keycloak MCP Server

by Cayetano97

upload_client_certificate_and_key

Upload a certificate and private key as a client attribute in a Keycloak realm. Use it to attach keystore content (JKS, PKCS12, PEM) with alias and passwords for client certificate configuration.

Instructions

Upload a certificate and its private key for a client attribute.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "realm": "<realm>",
      "client_uuid": "<client_uuid>",
      "attr": "<attr>",
      "upload": "<upload>"
    },
    "name": "upload_client_certificate_and_key"
  }
}

Input Schema

NameRequiredDescriptionDefault
attrYesCertificate attribute name
realmYesRealm name
uploadYesMultipart form fields: file (keystore content as text, or file_base64 for binary content such as JKS/PKCS12), keystoreFormat ("JKS", "PKCS12", "PEM"...), keyAlias, keyPassword, storePassword
client_uuidYesClient UUID

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations supplied, the description carries the full behavioral burden. It reveals that a private key is transmitted (useful, security-sensitive context) but says nothing about required permissions, whether an existing certificate is replaced or rejected, or what side effects occur on the client record.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is a single tight sentence with the resource and scope front-loaded and no filler. The brevity is efficient, though it tips into under-specification for an operation this sensitive.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

This is a four-required-parameter mutation involving a nested multipart object and private-key material, with no annotations and no output schema. The one-line description leaves the agent without behavioral or outcome guidance that the structured fields do not supply.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, and the nested upload object already documents file/file_base64, keystoreFormat, keyAlias, keyPassword, and storePassword in detail. The description adds no syntax, format, or alias-matching meaning beyond that, so the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a specific verb and resource ("Upload a certificate and its private key") scoped to "a client attribute", so the action is clear. However, it does not distinguish itself from the close sibling upload_client_certificate_only, leaving the agent to infer the difference between uploading a pair versus a certificate alone.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to use this tool versus upload_client_certificate_only, upload_identity_provider_certificate, or generate_and_download_client_keypair. No prerequisites (e.g. needing an existing client or a keystore in hand) are stated, so routing must be guessed from the name.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools