Skip to main content
Glama

x_auth_upsert_app_credentials

Store or rotate tenant-scoped X app credentials for bearer token or OAuth1 consumer authentication. Updates Vault secrets and Postgres metadata for the tenant's app profile.

Instructions

Store or rotate tenant-scoped X app credentials. Use when: you need a bearer token for app-auth endpoints or OAuth1 consumer credentials for OAuth1 user signing. Do not use when: you are storing user/account-specific access tokens; use x_auth_upsert_principal_credentials instead. Risk: mutating, high-risk. Required permissions and prerequisites: tenantId is required; provide bearerToken and/or the OAuth1 consumer key pair. Environment-selection behavior: writes Vault secrets under the tenant app-profile path and metadata under tenant-scoped Postgres config. Expected response shape: { ok, status, data: { profileKey, authTypesAvailable, secretPath, updatedAt } } Common failure conditions: missing tenantId, empty secret values, Vault write failures, or Postgres write failures. Safety warnings: rotating these credentials can affect every principal in the tenant that relies on the default app profile. Example: {"tenantId":"acme","profileKey":"default","bearerToken":"...","makeDefault":true,"authorizationKey":""}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
labelNo
notesNo
tenantIdYes
profileKeyNo
bearerTokenNo
makeDefaultNo
authorizationKeyNo
oauth1ConsumerKeyNo
oauth1ConsumerSecretNo
Behavior5/5

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

No annotations are provided, so the description carries the full burden. It discloses risk ('mutating, high-risk'), prerequisites, environment-selection behavior (Vault secrets and Postgres metadata), expected response shape, common failure conditions, and a safety warning about rotating credentials affecting all principals. This far exceeds expected transparency.

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

Conciseness5/5

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

The description uses labeled sections ('Use when', 'Risk', 'Expected response shape', etc.) that front-load the most important information and keep each line purposeful. It is dense but well-organized, and every sentence contributes actionable guidance without redundancy.

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

Completeness5/5

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

Given the tool's complexity (9 params, no annotations, no output schema), the description is remarkably complete: it covers purpose, usage boundaries, risk, prerequisites, behavior, response format, failure modes, safety warnings, and a concrete example. This is a textbook example of a contextually complete description.

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

Parameters4/5

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

Schema description coverage is 0%, but the description compensates for key parameters: tenantId is explicitly required, bearerToken and OAuth1 consumer key/secret are explained as an either/or choice, and profileKey, makeDefault, and authorizationKey appear in the example with meaningful context. However, label and notes are not semantically described, leaving a small gap.

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

Purpose5/5

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

The description opens with a specific verb+resource: 'Store or rotate tenant-scoped X app credentials.' It clearly distinguishes this tool from the sibling x_auth_upsert_principal_credentials by specifying tenant-scoped app credentials vs. user/account-specific tokens.

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

Usage Guidelines5/5

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

Explicit 'Use when:' and 'Do not use when:' sections provide direct guidance, including naming the alternative tool (x_auth_upsert_principal_credentials) for the excluded case. This is exactly the kind of when-to-use vs. when-not-to-use clarity desired.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/LesterAJohn/X-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server