Skip to main content
Glama

list_slides

Retrieve all slides from a Google Slides presentation by providing the presentation ID to view and manage slide content.

Instructions

List all slides in a Google Slides presentation

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
presentationIdYesThe ID of the Google Slides presentation

Implementation Reference

  • The MCP server handler for the 'list_slides' tool. It calls the slidesService.listSlides method and formats the results into a text response listing all slides with their IDs and titles.
    private async handleListSlides(args: {
      presentationId: string;
    }): Promise<CallToolResult> {
      const slides = await this.slidesService.listSlides(args.presentationId);
    
      const slidesList = slides
        .map((slide) => `- ${slide.title} (ID: ${slide.slideId})`)
        .join('\n');
    
      return {
        content: [
          {
            type: 'text',
            text: `Slides in presentation:\n${slidesList}`,
          },
        ],
      };
    }
  • src/index.ts:125-137 (registration)
    Registration of the 'list_slides' tool in the ListToolsRequestSchema handler, including name, description, and input schema.
      name: 'list_slides',
      description: 'List all slides in a Google Slides presentation',
      inputSchema: {
        type: 'object',
        properties: {
          presentationId: {
            type: 'string',
            description: 'The ID of the Google Slides presentation',
          },
        },
        required: ['presentationId'],
      },
    },
  • Input schema definition for the 'list_slides' tool, specifying the required 'presentationId' parameter.
    inputSchema: {
      type: 'object',
      properties: {
        presentationId: {
          type: 'string',
          description: 'The ID of the Google Slides presentation',
        },
      },
      required: ['presentationId'],
    },
  • Core helper method in GoogleSlidesService that fetches the presentation from Google Slides API, extracts slide information, and returns an array of SlideInfo objects.
    async listSlides(presentationId: string): Promise<SlideInfo[]> {
      await this.auth.refreshTokenIfNeeded();
      const slides = this.auth.getSlidesClient();
    
      try {
        const response = await slides.presentations.get({
          presentationId
        });
    
        return response.data.slides?.map((slide: any, index: number) => ({
          slideId: slide.objectId,
          title: `Slide ${index + 1}`
        })) || [];
      } catch (error) {
        console.error('Error listing slides:', error);
        throw new Error(`Failed to list slides: ${error}`);
      }
    }
  • Type definition for SlideInfo used as the return type for listSlides, defining slide ID and optional title.
    export interface SlideInfo {
      slideId: string;
      title?: string;
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action ('List all slides') but doesn't mention whether this is a read-only operation, what permissions are required, how results are returned (e.g., pagination, format), or potential errors. This leaves significant gaps for a tool that interacts with external resources.

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?

The description is a single, efficient sentence that directly states the tool's purpose without any wasted words. It is appropriately sized and front-loaded, making it easy to understand at a glance.

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?

Given the lack of annotations and output schema, the description is incomplete. It doesn't cover behavioral aspects like authentication needs, error handling, or return format, which are critical for a tool that lists slides from an external service like Google Slides. This leaves the agent with insufficient context for reliable 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?

The schema description coverage is 100%, with the 'presentationId' parameter fully documented in the schema. The description adds no additional meaning beyond implying the parameter is needed, so it meets the baseline score of 3 where the schema does the heavy lifting.

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 ('List') and resource ('all slides in a Google Slides presentation'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'get_presentation_info', which might also retrieve presentation-related data, so it doesn't reach the highest score.

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 like 'get_presentation_info' or 'create_slide'. It lacks any context about prerequisites, such as needing an authenticated session or a valid presentation ID, leaving usage entirely implicit.

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/vamsikiran353-gif/google-slides-mcp'

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