Skip to main content
Glama

getWatchtowerContent

Retrieve and format Watchtower article content by processing RTF files into clean, structured plain text for study and reference purposes.

Instructions

STEP 2: Get the actual Watchtower article content after user chooses an article. Use this tool AFTER getWatchtowerLinks when user specifies which article they want (e.g., "Imitate the Faithful Angels" or "Look to Jehovah for Comfort"). Takes the RTF URL from Step 1 results, downloads the RTF file, parses it to clean plain text, and returns the formatted article content with proper structure and line breaks.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesThe RTF file URL from getWatchtowerLinks results (e.g., "https://cfp2.jw-cdn.org/a/...")

Implementation Reference

  • The core handler function that downloads the RTF content from the provided URL using downloadRtfContent and parses it to plain text using parseRTF, returning structured results including the parsed text.
    export async function getWatchtowerContent(url) {
      const rtfData = await downloadRtfContent(url);
    
      try {
        // Parse RTF to plain text
        const parsedText = parseRTF(rtfData.content);
    
        return {
          url: rtfData.url,
          contentType: rtfData.contentType,
          originalSize: rtfData.size,
          parsedText: parsedText,
          parsedSize: parsedText.length
        };
      } catch (error) {
        throw new Error(`Failed to parse RTF content: ${error.message}`);
      }
    }
  • The tool registration object defining name, description, and input schema for getWatchtowerContent within the exported watchtowerTools array.
    {
      name: 'getWatchtowerContent',
      description: 'STEP 2: Get the actual Watchtower article content after user chooses an article. Use this tool AFTER getWatchtowerLinks when user specifies which article they want (e.g., "Imitate the Faithful Angels" or "Look to Jehovah for Comfort"). Takes the RTF URL from Step 1 results, downloads the RTF file, parses it to clean plain text, and returns the formatted article content with proper structure and line breaks.',
      inputSchema: {
        type: 'object',
        properties: {
          url: {
            type: 'string',
            description: 'The RTF file URL from getWatchtowerLinks results (e.g., "https://cfp2.jw-cdn.org/a/...")'
          }
        },
        required: ['url']
      }
    }
  • The MCP-specific tool handler logic within handleWatchtowerTools that processes requests for getWatchtowerContent, validates input, calls the core handler, and formats the response.
    // Handle getWatchtowerContent tool  
    if (request.params.name === 'getWatchtowerContent') {
      try {
        const { url } = request.params.arguments;
        
        if (!url) {
          return {
            content: [
              {
                type: 'text',
                text: 'Error: URL parameter is required',
              },
            ],
            isError: true,
          };
        }
        
        const result = await getWatchtowerContent(url);
        
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(result, null, 2),
            },
          ],
        };
      } catch (error) {
        return {
          content: [
            {
              type: 'text',
              text: `Error: ${error.message}`,
            },
          ],
          isError: true,
        };
      }
    }
  • Input schema definition for the getWatchtowerContent tool, specifying the required 'url' parameter.
    inputSchema: {
      type: 'object',
      properties: {
        url: {
          type: 'string',
          description: 'The RTF file URL from getWatchtowerLinks results (e.g., "https://cfp2.jw-cdn.org/a/...")'
        }
      },
      required: ['url']
    }
Behavior4/5

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

With no annotations provided, the description carries full burden and does well by disclosing key behaviors: it downloads files, parses RTF to clean plain text, and returns formatted content with structure and line breaks. It doesn't mention error handling, rate limits, or authentication needs, but provides substantial operational context for a read operation.

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?

Perfectly structured with zero waste. The first sentence establishes purpose and positioning, the second explains the processing pipeline, and every phrase adds value. It's front-loaded with the most important information (when to use) and maintains appropriate density.

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?

For a single-parameter tool with no output schema, the description provides excellent context about the workflow, processing behavior, and expected output format. It could mention what happens with invalid URLs or network errors, but covers the essential operational context thoroughly given the tool's simplicity.

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 the schema already documents the single 'url' parameter. The description adds marginal value by specifying this is 'The RTF file URL from getWatchtowerLinks results' and providing an example URL pattern, but doesn't add significant semantic information 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 clearly states the tool's purpose with specific verbs ('downloads', 'parses', 'returns') and resources ('RTF file', 'article content'). It distinguishes from sibling getWatchtowerLinks by specifying this is 'STEP 2' for getting content after article selection, not for listing links.

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?

Explicitly states when to use ('AFTER getWatchtowerLinks when user specifies which article they want') and provides concrete examples of user requests ('Imitate the Faithful Angels' or 'Look to Jehovah for Comfort'). It clearly positions this tool in a workflow sequence with its sibling.

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/advenimus/jw-mcp'

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