Skip to main content
Glama

generate_url

Turn any Mediagraph entity ID, slug, or GUID into a direct, shareable deep-link URL. Covers assets, collections, lightboxes, folders, tags, share links, and explore root.

Instructions

Generate a direct deep-link URL to a Mediagraph entity (asset, collection, lightbox, storage folder, tag, creator tag, share link, or the explore root).

Two host modes:

Path patterns: asset → /explore#/assets/{guid} (hash route) collection → /explore/collections/{slug} lightbox → /explore/projects/{id}-{slug} storage_folder → /explore/folders/{slug} tag, creator_tag → /explore/tags/{id}-{name} share_link → /share-links/{share_code}

Identifier rules:

  • Pass whichever identifier you already have (guid, slug, id+name, etc.); the tool fetches the entity if needed to derive the rest.

  • For assets, only guid is needed.

  • For collections / storage folders, slug works directly.

  • For lightboxes, the API returns a composite "slug" of the form "{id}-{name}" — pass it as slug.

  • For tags, pass id (and optionally name for a prettier URL).

Override host with --host (e.g., point at staging) or --base_host (just the fallback).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoNumeric id (for lightbox + tag composite URLs, or to auto-fetch)
guidNoAsset guid
hostNoOverride the full host (e.g. "dam.mer.fm" or "https://staging.example.com")
nameNoTag/lightbox name (used to build the {id}-{name} composite if slug missing)
slugNoPre-computed slug (collection / storage_folder / lightbox composite)
typeYesEntity type
autofetchNoWhen true (default) and a required identifier is missing, fetch the entity to derive it.
base_hostNoOverride only the no-custom-domain fallback host. Default https://mediagraph.io
share_codeNoShare code for share_link URLs
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses key behavioral traits: it may fetch the entity if needed, supports two host modes, and uses hash routes for assets. It does not mention potential side effects or API costs, but given that this is a read-only URL generator, the disclosure is sufficient.

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 well-organized into logical sections: overview, host modes, path patterns, identifier rules, and overrides. The first sentence is a clear summary, and every subsequent line adds necessary detail without redundancy. Length is appropriate for the tool's complexity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite having no output schema, the description fully explains the output format by listing path patterns for every entity type and how hosts are constructed. It covers all nine parameters and provides enough context for an agent to invoke the tool correctly without ambiguity. Complete for a URL-generation tool.

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

Parameters5/5

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

Although schema coverage is 100%, the description adds substantial cross-parameter meaning beyond the schema. It explains which identifiers are valid for each entity type, that lightboxes use a composite '{id}-{name}' slug, and that tags can optionally include a name for prettier URLs. This guidance is not present in the schema alone.

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 opens with a specific verb ('Generate') and resource ('direct deep-link URL to a Mediagraph entity'), enumerating all supported entity types. This clearly distinguishes it from any sibling tool, none of which generate URLs.

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?

The description provides explicit use cases and contextual guidance: it explains identifier rules per entity type, when to use each parameter, and how to override hosts for staging. It also implicitly states when the tool is appropriate—whenever a deep-link URL is needed—and gives concrete examples.

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/mediagraph-io/mediagraph-mcp'

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