Skip to main content
Glama

Turn two-factor authentication on or off

set_user_tfa
Idempotent

Enable or disable two-factor authentication for a Wiki.js account. Enabling forces the user to enrol at next sign-in; disabling is gated by a confirmation token to prevent unauthorized removal.

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.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
truncatedNoPresent only when the answer was shortened to fit the budget.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.3.0
    • changedInput schema / properties / user_id / maximum
      Previous value: -9007199254740991New value: +2147483647
  2. Changed2 schema fields changedv0.2.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "additionalProperties": true,
      +  "properties": {
      +    "truncated": {
      +      "additionalProperties": true,
      +      "description": "Present only when the answer was shortened to fit the budget.",
      +      "properties": {},
      +      "type": "object"
      +    }
      +  },
      +  "type": "object"
      +}
  3. First observedv0.1.2

TDQS

A4.4/5.0
Behavior5/5

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

The description goes well beyond the annotations by explaining the security implications ('Turning it OFF weakens that account'), why the operation is gated, what happens on next sign-in when enabled, and the prerequisite confirmation token. This adds meaningful behavioral context that the annotations alone do not capture.

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 short, purposeful sentences deliver the core action, the security consequences, and the prerequisite. Every sentence earns its place, and the most important behavioral warning is front-loaded.

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 is complete enough for a state-toggle tool with a full schema and output schema. It covers the action, the impact, the reason for gating, and the token requirement; the exact two-step confirmation mechanics are left to the schema, which is acceptable given the 100% coverage.

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?

With 100% schema description coverage, the schema already documents all three parameters clearly, including the confirmation-token flow. The description adds only a brief statement that a token is required, which is a reasonable baseline but does not meaningfully enhance the parameter-level detail 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?

The description uses a specific verb ('Switches') and resource ('an account's second factor'), and clearly states both directions: turning it on or off. It is immediately distinguishable from the sibling user-management tools because it names two-factor authentication explicitly and explains the effect of each state.

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?

The description gives clear context for when to use the tool: when you need to toggle 2FA for a user. It does not name explicit alternatives, but no sibling tool is a real alternative for this operation, and the description implies the intended use by explaining the consequences of both settings.

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