Skip to main content
Glama

Turn two-factor authentication on or off

set_user_tfa

Switch a user's two-factor authentication on or off. Turning it on forces enrolment at next sign-in; turning it off requires a confirmation token.

Instructions

Switches an account’s second factor. Turning it OFF weakens that account and is the reason this is gated; turning it on forces the user to enrol at their next sign-in. Requires a confirmation token.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
enabledYesTrue to require 2FA, false to remove it.
user_idYesNumeric Wiki.js id.
confirm_tokenNoToken from this tool’s previous, unconfirmed call. Omit it to receive one.
Behavior4/5

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

Annotations only provide idempotentHint=false, so the description carries the behavioral burden. It discloses the security consequence of disabling 2FA, the enrollment trigger when enabling, and the requirement for a confirmation token — useful operational context beyond what annotations convey.

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?

Three tight sentences with no filler: the core action is front-loaded, the critical security caveat follows immediately, and the prerequisite is stated last. Every sentence earns its place.

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

Completeness4/5

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

The description covers the essential behavioral outcomes and prerequisite for a non-trivial two-phase token flow. It does not explicitly state the return value, but the schema's confirm_token description ('Omit it to receive one') sufficiently implies the response shape for an agent.

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%, so the schema already documents enabled, user_id, and confirm_token clearly. The description reiterates the token requirement but adds little parameter-specific meaning beyond what the schema provides.

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?

Description states a specific verb ('Switches') and resource ('account's second factor'), and explicitly covers both polarities (on/off). It is clearly distinct from sibling user-management tools like set_user_active or verify_user, which address different account state changes.

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

Usage Guidelines4/5

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

Provides clear usage context: turning off weakens the account and is gated; turning on forces enrollment at next sign-in. It lacks explicit 'when not to use' guidance, but no sibling tool targets 2FA, so the intended use is unambiguous.

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/ni-c/wikijs-mcp'

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