Skip to main content

Overview

The get_full_content_tool retrieves the complete, reassembled content of a documentation page. Use this tool when search results provide a relevant chunk, but you need to see the full page context.
This tool is typically called after search_documents_tool returns results. Each search result includes a tool_hint with the exact parameters to pass to this tool.

Parameters

string
required
The complete URL of the documentation page to retrieve. Must match exactly with a URL in the database.Example:https://fastapi.tiangolo.com/tutorial/security/first-steps/
string
required
The version of the documentation. Must match the version string stored in the database.Example: “0.104.0”, “latest”, “v4.5.2”

Return Format

Returns a formatted markdown string containing the complete page content.

Successful Retrieval

Page Not Found

Database Error

Response Fields

The formatted response includes:
string
The title of the documentation page (from the first chunk’s metadata)
string
The original URL of the documentation page
string
The version identifier for this documentation snapshot
string
The complete page content, reassembled from all chunks in correct order (sorted by chunk_index)

How It Works

Chunk Reassembly

Documentation pages are stored as chunks during ingestion:
  1. Query database: Find all chunks matching the URL and version
  2. Sort by chunk_index: Ensures content is in original order
  3. Concatenate: Joins chunks with double newlines (\n\n)
  4. Format: Wraps in markdown with title and metadata

Database Query

Chunking Context

During ingestion, pages are split into overlapping chunks:
  • Default chunk size: 800 characters
  • Default overlap: 200 characters
  • Chunk index: Sequential integer starting at 0
When reassembled, the overlap is preserved, which may result in some repeated content at chunk boundaries.

Example Usage

From Search Result

Typical workflow:
Response:

Direct URL Access

Response:

Page Not Found

Response:

Integration Patterns

Selective Full Content Retrieval

Batch Content Retrieval

Best Practices

Use tool hints from search results:Don’t manually construct URLs. Always use the tool hint provided in search_documents_tool results to ensure exact URL matching.
URL must match exactly:URLs are matched byte-for-byte. Ensure no extra/missing slashes, query parameters, or fragments unless they were in the original indexed URL.

When to Fetch Full Content

Fetch full content when:
  • Search chunk doesn’t provide enough context
  • You need to see complete code examples
  • Multiple sections of the page might be relevant
  • User explicitly asks to “see the full page”
Don’t fetch full content when:
  • Search chunk already answers the question
  • You’re just verifying a quick fact
  • Multiple results need triage first
  • Bandwidth/latency is a concern

Content Size Awareness

Full pages can be large: Consider token limits when passing full content to LLMs.

Performance Characteristics

Query Performance

  • Small pages (< 5 chunks): < 10ms
  • Medium pages (5-20 chunks): 10-50ms
  • Large pages (20-100 chunks): 50-200ms
  • Very large pages (> 100 chunks): 200-500ms

Caching

Unlike list_libraries_tool, this tool does not cache results. Each call performs a fresh database query.
Rationale:
  • Full content is typically fetched once per page
  • Caching would consume significant memory
  • Database queries are fast enough for on-demand retrieval

Troubleshooting

”No content found” Errors

Cause 1: URL mismatch
Solution: Use exact URL from search result tool hint
Cause 2: Version mismatch
Solution: Use exact version from search result tool hint
Cause 3: Page never indexed The page might not have been included during library ingestion. Solution: Re-run ingestion with updated sitemap/crawler settings

Truncated or Incomplete Content

Symptom: Content seems to cut off mid-sentence Cause: Chunks were not properly indexed or chunk_index is missing Solution:
  1. Check ingestion logs for errors
  2. Re-ingest the library version
  3. Verify chunk_index values in database

Duplicate Content at Chunk Boundaries

Symptom: Some sentences/paragraphs appear twice Cause: Chunk overlap during ingestion (this is expected behavior) Solution: This is normal. The overlap ensures context is preserved across chunk boundaries. If it’s excessive, reduce chunk_overlap configuration before re-ingesting.

Wrong Content Returned

Symptom: Content doesn’t match the URL Cause: Database corruption or multiple versions with same URL Solution:
  1. Verify version parameter is correct
  2. Check for duplicate entries: openground list <library>
  3. Delete and re-ingest the library version