Skip to main content
Glama

rigshare_list_my_bookings

Retrieve your current RIGShare bookings with details on equipment, dates, status, and totals. Use this to review existing rentals before booking new equipment or to track a confirmation code.

Instructions

REQUIRES API KEY (RIGSHARE_API_KEY env var, bookings:read scope). Returns the authenticated user's RIGShare bookings — equipment, dates, status, totals. Use this to check an existing rental before creating a new one, or to track a confirmation code.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
statusNoFilter to a specific booking status.
limitNo
pageNo

Implementation Reference

  • src/index.ts:199-229 (registration)
    Registration of the rigshare_list_my_bookings tool in the ListToolsRequestSchema handler, defining its name, description, and input schema (status filter, pagination limit/page). It's one of the authenticated tools (requires RIGSHARE_API_KEY).
    {
      name: "rigshare_list_my_bookings",
      description:
        "REQUIRES API KEY (RIGSHARE_API_KEY env var, bookings:read scope). Returns the authenticated user's RIGShare bookings — equipment, dates, status, totals. Use this to check an existing rental before creating a new one, or to track a confirmation code.",
      inputSchema: {
        type: "object",
        properties: {
          status: {
            type: "string",
            enum: [
              "PENDING",
              "APPROVED",
              "CONFIRMED",
              "IN_PROGRESS",
              "COMPLETED",
              "CANCELLED",
              "REFUNDED",
              "DISPUTED",
            ],
            description: "Filter to a specific booking status.",
          },
          limit: {
            type: "integer",
            minimum: 1,
            maximum: 100,
            default: 10,
          },
          page: { type: "integer", minimum: 1, default: 1 },
        },
      },
    },
  • Handler function for rigshare_list_my_bookings. Checks for API key, calls the authenticated agent API endpoint /api/v1/agent/bookings with optional status/limit/page query params, transforms the response into a formatted text listing of bookings (confirmation code, status, equipment, dates, total amount, deposit, booking ID).
    async function listMyBookings(args: Record<string, unknown>) {
      if (!RIGSHARE_API_KEY) return toolError(API_KEY_ERROR_MSG);
    
      const params = new URLSearchParams();
      if (args.status) params.set("status", String(args.status));
      if (args.limit) params.set("limit", String(args.limit));
      if (args.page) params.set("page", String(args.page));
    
      const res = await fetchAuthJson(
        RIGSHARE_API_KEY,
        `${RIGSHARE_AGENT_API}/bookings?${params.toString()}`,
      );
      if (res.error) return toolError(res.error);
      const bookings = ((res.data as any)?.bookings || []) as any[];
      if (bookings.length === 0) {
        return toolText(
          `No bookings found${args.status ? ` with status ${args.status}` : ""}.`,
        );
      }
      const lines = bookings.map((b, i) => {
        return [
          `${i + 1}. ${b.confirmationCode} — ${b.status}`,
          `   ${b.equipment?.title || "—"} (${b.equipment?.category || "—"})`,
          `   ${new Date(b.startDate).toLocaleDateString()} → ${new Date(b.endDate).toLocaleDateString()} · ${b.durationType}`,
          `   Total: $${((b.totalAmount || 0) / 100).toFixed(2)} · Deposit: $${((b.securityDeposit || 0) / 100).toFixed(2)}`,
          `   Booking ID: ${b.id}`,
        ].join("\n");
      });
      return toolText(`Your bookings:\n\n${lines.join("\n\n")}`);
    }
  • Input schema for rigshare_list_my_bookings — accepts optional status filter (enum of 8 booking states), pagination limit (1-100, default 10), and page number (default 1).
    inputSchema: {
      type: "object",
      properties: {
        status: {
          type: "string",
          enum: [
            "PENDING",
            "APPROVED",
            "CONFIRMED",
            "IN_PROGRESS",
            "COMPLETED",
            "CANCELLED",
            "REFUNDED",
            "DISPUTED",
          ],
          description: "Filter to a specific booking status.",
        },
        limit: {
          type: "integer",
          minimum: 1,
          maximum: 100,
          default: 10,
        },
        page: { type: "integer", minimum: 1, default: 1 },
      },
    },
  • Helper function fetchAuthJson used by listMyBookings to make authenticated fetch requests. It attaches the Bearer token via the RIGSHARE_API_KEY, sends JSON content-type headers, and parses the response, returning either data or an error.
    async function fetchAuthJson(
      apiKey: string,
      url: string,
      init: RequestInit = {},
    ): Promise<{ data?: any; status?: number; error?: string }> {
      try {
        const res = await fetch(url, {
          ...init,
          headers: {
            ...(init.headers || {}),
            Accept: "application/json",
            "Content-Type": "application/json",
            "User-Agent": USER_AGENT,
            Authorization: `Bearer ${apiKey}`,
          },
        });
        const data = await res.json().catch(() => ({}));
        if (!res.ok) {
          return {
            status: res.status,
            error:
              (data as any)?.error ||
              `RIGShare Agent API returned HTTP ${res.status}`,
          };
        }
        return { data, status: res.status };
      } catch (err: any) {
        return { error: err?.message || "Network error contacting RIGShare Agent API" };
      }
    }
Behavior3/5

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

With no annotations provided, the description must disclose behavioral traits. It mentions authentication requirements (API key, scope) and the fields returned. However, it does not detail pagination behavior, default sorting, rate limits, or response size limits, leaving some gaps.

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 two concise sentences that front-load the critical requirement (API key and scope). Every sentence adds value without redundancy or unnecessary elaboration.

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?

Given no output schema, the description should fully explain the response. It lists fields but omits details on pagination, default sorting, how to retrieve all bookings, or any example. The input schema defaults are present but not explained, leaving the tool contextually incomplete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Only 33% of schema parameters have descriptions (status has a description; limit and page lack any). The description does not add extra meaning to these parameters beyond their schema definitions, failing to compensate for the low coverage.

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 it returns the authenticated user's bookings with specific fields (equipment, dates, status, totals). It distinguishes from siblings like 'rigshare_create_booking' and 'rigshare_search_equipment' by focusing on listing existing bookings for the user.

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

Usage Guidelines4/5

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

The description explicitly recommends using this tool to check existing rentals before creating a new one or to track a confirmation code. It also mentions the API key requirement and scope, but does not explicitly state when not to use it or list alternatives.

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/RPER2001/rigshare-mcp'

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