Skip to main content
Glama

add_from_url

Fetches web content by URL, converts it to Markdown, and indexes it into the knowledge base for immediate search.

Instructions

Fetch content from a URL, convert to markdown, and add to the knowledge base.

Mutating — makes an outbound HTTP request (requires internet access), strips HTML, converts to markdown, saves to disk, and indexes immediately.

Args: url: Full URL to fetch (https:// required). The page must be publicly accessible. category: Category stored with the document and the folder it is saved in; default: general. Being part of the path, it must stay inside documents_dir: a value such as ../outside returns a "Filepath rejected" error. Any other name is accepted, but search_knowledge() filters only by configured categories (category_mappings values, keyword_routes keys, general), and update_document() or re-indexing the file detects it again from the path through category_mappings. list_categories() shows the categories in use. title: Optional document title. Auto-detected from the page's tag if omitted.

Returns: JSON string with indexing results (filepath, category, chunks added, status). The page is saved as /.md, or as -<first 8 hex characters of the URL's SHA-256>.md (then 16, then the full digest) when a file not saved from this URL already has the shorter name. Use the returned filepath instead of building the path.

Usage: Use to ingest web content (writeups, blog posts, documentation pages) directly by URL. Use add_document() instead when you already have the text content. The document is immediately searchable after this call — no manual reindex needed.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "url": "<url>"
    },
    "name": "add_from_url"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYes
titleNo
categoryNogeneral

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv4.11.1
    • addedInput schema / properties / title / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedInput schema / properties / title / type
      Removed value: -"string"
  2. First observedv3.0.0

TDQS

A4.7/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and does so well: it declares the tool mutating, notes the outbound HTTP request and internet-access requirement, and describes disk persistence plus immediate indexing. It also discloses a concrete failure mode ("Filepath rejected" for a category escaping documents_dir) and filename-collision fallback behavior. The only gap is any statement about failure handling for unreachable pages or non-HTML content.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with purpose then behavior, then Args, Returns, and Usage in a predictable structure. The filename-collision escalation detail (8 hex chars, then 16, then full digest) is more than the agent needs given the follow-up advice to just use the returned filepath, and the Returns section partly restates the output schema.

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?

For a 3-parameter mutating ingestion tool with zero schema documentation and no annotations, everything needed to call it correctly is present: prerequisites, path constraints, defaulting rules, failure behavior, and post-call expectations. Cross-references to search_knowledge, list_categories, and update_document place it correctly in the sibling set.

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?

Schema description coverage is 0%, so the description must compensate entirely, and it does: url requires https and a publicly accessible page; category documents its default, its constraint to documents_dir, the "../outside" rejection, and its coupling to search_knowledge filtering and category_mappings; title documents auto-detection from the <title> tag.

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?

Opens with a specific verb chain and resource: "Fetch content from a URL, convert to markdown, and add to the knowledge base." It also signals the transformation pipeline (HTML strip → markdown → disk → index), which distinguishes it from sibling add_document and from read-only tools like get_document.

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?

Explicitly routes the agent: "Use to ingest web content (writeups, blog posts, documentation pages) directly by URL. Use add_document() instead when you already have the text content." It also preempts a likely mistake by stating no manual reindex is needed, which removes a plausible competing call to reindex_documents.

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