Skip to main content
Glama

Build Url

build_url
Read-onlyIdempotent

Build a URL string from components. Provide at least hostname (and optionally protocol, port, path, hash) plus a query object of key/value pairs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hashNoOptional fragment (without "#").
pathNoPath, e.g. "/search" (default "/").
portNoOptional port.
queryNoQuery parameters as an object, e.g. {"q":"cats","page":2}.
hostnameYesHost, e.g. "example.com".
protocolNoe.g. "https" (default).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "hostname": "example.com",
      +    "path": "/search",
      +    "protocol": "https",
      +    "query": {
      +      "page": 2,
      +      "q": "cats"
      +    }
      +  },
      +  {
      +    "hash": "results",
      +    "hostname": "api.example.com",
      +    "path": "/v1/users",
      +    "port": 8443,
      +    "query": {
      +      "limit": 10
      +    }
      +  }
      +]
  2. First observed

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, openWorldHint=true, idempotentHint=true, and destructiveHint=false, which fully disclose the safe, pure-computation nature. The description adds minimal behavioral context beyond confirming it returns a constructed string.

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?

Two sentences, front-loading the purpose and listing key components. Every word contributes to understanding, with no redundancy.

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

Completeness4/5

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

For a tool with 6 parameters, nested objects, and no output schema, the description adequately explains the construction task and key inputs. It could mention default values (e.g., protocol defaults to https) but those are covered in schema.

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 coverage is 100% with well-described parameters, so the description's mention of required hostname and query object adds marginal value. It does not introduce new semantics beyond what the schema already provides.

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 the verb 'Build' and resource 'URL string from components', enumerating components like hostname, protocol, port, path, hash, and query. It effectively communicates the tool's purpose.

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?

Provides clear guidance on required input (at least hostname) and optional components plus a query object. Although it doesn't explicitly mention when not to use or alternatives, the distinction from sibling parse_url is implied.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.