Skip to main content
Glama

get_rights

Retrieve rights and licensing information for media assets to verify provenance and license terms, including C2PA credentials, structured data, and metadata.

Instructions

Get rights and licensing information for a registered media asset. Returns C2PA content credentials, Schema.org structured data, IPTC rights metadata, and TDM-AI protocol declarations. Useful for verifying provenance and license terms.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
media_idYesUUID of the media asset

Implementation Reference

  • Complete handler implementation for the get_rights tool. Defines the tool name 'get_rights', description, input schema (media_id parameter), and the async handler logic that makes an API call to /api/v1/rights/{media_id} and returns the response with error handling.
    export function register(server: McpServer, api: ApiClient): void {
      server.tool(
        "get_rights",
        "Get rights and licensing information for a registered media asset. " +
          "Returns C2PA content credentials, Schema.org structured data, IPTC rights metadata, " +
          "and TDM-AI protocol declarations. Useful for verifying provenance and license terms.",
        {
          media_id: z.string().describe("UUID of the media asset"),
        },
        async ({ media_id }) => {
          try {
            const result = await api.get(
              `/api/v1/rights/${encodeURIComponent(media_id)}`,
            );
            return {
              content: [
                { type: "text" as const, text: JSON.stringify(result, null, 2) },
              ],
            };
          } catch (err) {
            return {
              content: [
                {
                  type: "text" as const,
                  text: `Error: ${err instanceof Error ? err.message : String(err)}`,
                },
              ],
              isError: true as const,
            };
          }
        },
      );
    }
  • Input validation schema using Zod. Defines the required media_id parameter as a string, described as 'UUID of the media asset'.
    {
      media_id: z.string().describe("UUID of the media asset"),
    },
  • src/index.ts:20-20 (registration)
    Import statement for the get_rights tool register function from ./tools/get-rights.js
    import { register as getRights } from "./tools/get-rights.js";
  • src/index.ts:66-66 (registration)
    Registration call that activates the get_rights tool by calling getRights(server, api) in the 'Rights & billing' section
    getRights(server, api);

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/sidearmDRM/mcp-server'

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