Skip to main content
Glama
huiseo

Outline Wiki MCP Server

by huiseo

update_document

Modify existing documents in Outline wiki by editing titles, content, or appending new information to maintain current documentation.

Instructions

Update an existing document. Can append content with append mode.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
documentIdYes
titleNo
textNo
appendNo

Implementation Reference

  • Core implementation of the update_document tool handler. Checks access, fetches existing content if appending, constructs payload, calls Outline API /documents.update, returns formatted result.
    async update_document(args: UpdateDocumentInput) {
      checkAccess(config, 'update_document');
    
      let text = args.text;
      if (args.append && args.text) {
        const { data: existing } = await apiCall(() =>
          apiClient.post<OutlineDocument>('/documents.info', { id: args.documentId })
        );
        text = (existing.text || '') + '\n\n' + args.text;
      }
    
      const payload: Record<string, unknown> = { id: args.documentId };
      if (args.title) payload.title = args.title;
      if (text !== undefined) payload.text = text;
    
      const { data } = await apiCall(() =>
        apiClient.post<OutlineDocument>('/documents.update', payload)
      );
      return docResult(data, MESSAGES.DOCUMENT_UPDATED);
    },
  • Zod schema defining input for update_document: documentId (required), title/text (optional), append (boolean). Used for validation and type inference.
    export const updateDocumentSchema = z.object({
      documentId,
      title: z.string().min(1).optional(),
      text: z.string().optional(),
      append: z.boolean().default(false),
    });
  • src/lib/tools.ts:80-84 (registration)
    Registers the update_document tool definition with name, description, and schema reference for MCP tool discovery.
    createTool(
      'update_document',
      'Update an existing document. Can append content with append mode.',
      'update_document'
    ),
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions the 'append mode' feature but doesn't describe what happens by default (replace vs. append), whether updates are reversible, what permissions are required, or what the response looks like. For a mutation tool with zero annotation coverage, this leaves significant behavioral questions unanswered.

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?

The description is appropriately brief with two sentences that get straight to the point. The first sentence states the core purpose, and the second adds the key feature about append mode. There's no wasted verbiage or unnecessary elaboration.

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?

For a mutation tool with 4 parameters, 0% schema coverage, no annotations, and no output schema, the description is inadequate. It doesn't explain parameter interactions, error conditions, return values, or behavioral nuances. The agent would struggle to use this tool correctly without significant trial and error.

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 0% schema description coverage, the description doesn't explain any of the 4 parameters beyond implying 'append' relates to 'append mode'. It doesn't clarify what 'documentId' represents, whether 'title' and 'text' are optional or required, or how they interact. The description adds minimal value beyond what's implied by the tool name.

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 clearly states the verb ('update') and resource ('an existing document'), making the purpose immediately understandable. It distinguishes from sibling tools like 'create_document' by specifying it works on existing documents, though it doesn't explicitly differentiate from 'batch_update_documents' or other update-related tools.

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?

The description provides minimal usage guidance - it mentions 'append mode' but doesn't specify when to use append vs. replace, nor does it provide context about when to choose this tool over alternatives like 'batch_update_documents' or 'move_document'. No prerequisites or exclusions are mentioned.

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/huiseo/outline-smart-mcp'

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