Skip to main content
Glama

Submit Auth Code

submit_auth_code

Submit a one-time OAuth authorization code to complete token exchange and save the authenticated session for fnOS NAS access.

Instructions

提交 OAuth 一次性授权码,完成 token 交换与 session 保存。

注意:该工具通过带 pty 的后台进程完成交互(CLI 要求 TTY 等待输入), 仅在 code 有效(5 分钟内、未使用)时成功。

Input Schema

NameRequiredDescriptionDefault
codeYes浏览器授权页面显示的一次性授权码
hostNoNAS 主机地址(IP 或域名)
portNoNAS 端口,如 5667(HTTPS)/5666(HTTP)/443
schemeNo传输协议
profileNo独立 session profile 名称,默认使用 default
tls_insecureNo允许 HTTPS 自签证书(跳过证书校验)
allow_insecure_httpNo允许远程明文 HTTP(危险,仅在受信任网络使用)

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.2

TDQS

A3.6/5.0
Behavior4/5

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

No annotations exist, so the description carries the full burden and does add real behavioral context: the call spawns a pty-backed background process because the CLI requires a TTY, it performs a token exchange and persists a session (a state-changing, non-idempotent side effect), and it fails when the code is expired or already consumed. It stops short of saying where the session is stored, which profile is affected, or what happens on partial failure.

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?

Two short, front-loaded sentences: the action first, then a caveat. Nothing is padded, and the '注意' block is genuinely relevant to invocation. Slightly less than ideal because the pty implementation detail is placed ahead of more decision-relevant information like the code's origin.

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

Completeness3/5

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

An output schema exists, so return values need not be described, and all seven params are covered in-schema. Still missing for a 7-parameter auth tool: how to obtain the code (which browser URL/flow precedes this), how this relates to the `login` sibling and to `profile` isolation, and what the agent should do when the code has expired.

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 description coverage is 100%, so every one of the seven parameters (code, host, port, scheme, profile, tls_insecure, allow_insecure_http) is already documented in the schema, and the baseline of 3 applies. The description adds no parameter-level meaning beyond the schema, such as how `profile` interacts with the saved session.

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?

States a specific verb and resource: submits an OAuth one-time authorization code and completes token exchange plus session persistence. That is materially more informative than the bare name 'Submit Auth Code'. It does not, however, distinguish itself from the sibling `login`/`whoami`/`logout` tools, so an agent cannot tell from the description alone which auth entry point applies.

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

Usage Guidelines3/5

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

The prerequisite is only implied: a code must come from a browser authorization page (that fact lives in the `code` parameter description, not the tool description). The 'within 5 minutes, unused' line describes validity rather than when to choose this tool over `login`. No explicit when-not or alternative routing is given.

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