Skip to main content
Glama

rdms_download_image

Download images from the RDMS system via URL and optionally analyze them for AI processing. Specify a filename for saved images or enable analysis directly.

Instructions

Download and optionally analyze image from RDMS system

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
analyzeNoWhether to return image for AI analysis
filenameNoOptional filename for saved image
imageUrlYesImage URL from RDMS

Implementation Reference

  • The main handler function that executes the rdms_download_image tool. Downloads the image from the provided RDMS URL using axios, converts to base64 if analyze=true (for AI vision), or saves to file if filename provided.
    async downloadImage(imageUrl, filename, analyze = true) {
      await this.ensureLoggedIn();
      
      try {
        const response = await this.client.get(imageUrl, { responseType: 'arraybuffer' });
        const imageBuffer = Buffer.from(response.data);
        const contentType = response.headers['content-type'] || 'image/png';
        const imageType = contentType.split('/')[1] || 'png';
        
        if (analyze) {
          // Return image data for AI analysis
          const base64Image = imageBuffer.toString('base64');
          return {
            content: [
              {
                type: 'text',
                text: JSON.stringify({
                  success: true,
                  imageUrl,
                  type: imageType,
                  size: imageBuffer.length,
                  message: `Image downloaded successfully (${Math.round(imageBuffer.length / 1024)}KB)`
                })
              },
              {
                type: 'image',
                data: base64Image,
                mimeType: contentType
              }
            ]
          };
        } else {
          // Save to file if filename provided
          if (filename) {
            const filepath = path.resolve(filename);
            fs.writeFileSync(filepath, imageBuffer);
            return {
              content: [{
                type: 'text',
                text: JSON.stringify({
                  success: true,
                  imageUrl,
                  savedTo: filepath,
                  type: imageType,
                  size: imageBuffer.length,
                  message: `Image saved to ${filepath}`
                })
              }]
            };
          } else {
            return {
              content: [{
                type: 'text',
                text: JSON.stringify({
                  success: true,
                  imageUrl,
                  type: imageType,
                  size: imageBuffer.length,
                  message: 'Image downloaded successfully'
                })
              }]
            };
          }
        }
      } catch (error) {
        return {
          content: [{
            type: 'text',
            text: JSON.stringify({
              success: false,
              error: error.message,
              imageUrl
            })
          }]
        };
      }
    }
  • Input schema definition for the rdms_download_image tool, specifying parameters: imageUrl (required), filename (optional), analyze (default true).
    {
      name: 'rdms_download_image',
      description: 'Download and optionally analyze image from RDMS system',
      inputSchema: {
        type: 'object',
        properties: {
          imageUrl: { type: 'string', description: 'Image URL from RDMS' },
          filename: { type: 'string', description: 'Optional filename for saved image' },
          analyze: { type: 'boolean', description: 'Whether to return image for AI analysis', default: true }
        },
        required: ['imageUrl']
      }
    }
  • index.js:152-153 (registration)
    Tool handler registration in the CallToolRequestSchema switch statement, dispatching calls to the downloadImage method.
    case 'rdms_download_image':
      return await this.downloadImage(args.imageUrl, args.filename, args.analyze);
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 downloading and optional analysis but fails to describe critical behaviors: where the image is saved (local file vs. memory), authentication requirements, rate limits, error handling, or what 'analysis' entails. This leaves significant gaps for a tool that interacts with external systems.

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 a single, efficient sentence that states the core functionality. It's appropriately front-loaded with the primary action. However, it could be slightly more specific about the download destination to improve clarity without adding unnecessary length.

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 tool with 3 parameters, no annotations, and no output schema, the description is insufficient. It doesn't explain what the tool returns (image data, analysis results, file path), error conditions, or system dependencies. The lack of behavioral transparency and output information makes it incomplete for effective agent use.

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 fully documents all three parameters. The description adds no additional parameter semantics beyond what's already in the schema descriptions. It mentions 'optionally analyze' which aligns with the analyze parameter but provides no extra context about analysis outcomes or filename usage.

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 'download' and resource 'image from RDMS system', specifying the core action. It distinguishes from sibling tools which focus on bug retrieval rather than image operations. However, it doesn't specify whether this downloads to local storage or returns data directly, leaving some ambiguity.

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 no guidance on when to use this tool versus alternatives. It mentions optional analysis but doesn't explain when analysis is beneficial or what alternatives exist for similar functions. No prerequisites, exclusions, or sibling tool comparisons are provided.

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/ad19900913/mcp-rdms'

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