Skip to main content
Glama
huiseo
by huiseo

get_document_id_from_title

Retrieve document IDs from Outline Wiki by searching with document titles, enabling efficient document management and reference.

Instructions

Find document ID by title.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
collectionIdNo

Implementation Reference

  • The handler function that executes the tool logic: searches for documents using the provided query (title), filters results where the title matches the query case-insensitively, and returns matching document IDs with titles and URLs.
    async get_document_id_from_title(args: GetDocumentIdFromTitleInput) {
      const { data } = await apiCall(() =>
        apiClient.post<SearchResult[]>('/documents.search', {
          query: args.query,
          collectionId: args.collectionId,
          limit: 5,
        })
      );
    
      return (data || [])
        .filter((item) => item.document.title.toLowerCase().includes(args.query.toLowerCase()))
        .map((item) => ({
          id: item.document.id,
          title: item.document.title,
          url: buildUrl(baseUrl, item.document.url),
        }));
    },
  • Zod schema defining the input for the tool: requires a query string (title to search for), optionally scoped to a collection ID.
    export const getDocumentIdFromTitleSchema = z.object({
      query: z.string().min(1, 'Query is required'),
      collectionId: collectionId.optional(),
    });
  • src/lib/tools.ts:41-45 (registration)
    Registration of the tool in the allTools array, converting the Zod schema to JSON schema for MCP tool definition.
    createTool(
      'get_document_id_from_title',
      'Find document ID by title.',
      'get_document_id_from_title'
    ),
Behavior2/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. 'Find document ID by title' implies a read-only lookup operation, but it doesn't specify whether this requires authentication, how it handles errors (e.g., no matches), rate limits, or what the return format looks like. The description is minimal and lacks essential behavioral context.

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 extremely concise at just 5 words with zero waste. It's front-loaded and gets straight to the point without unnecessary elaboration. For such a simple stated purpose, this level of brevity is appropriate.

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

Completeness2/5

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

Given 2 parameters with 0% schema coverage, no annotations, and no output schema, the description is insufficiently complete. It doesn't explain parameter usage, return values, error conditions, or how this tool differs from similar siblings. For a lookup tool that likely returns structured data, more context is needed.

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

Parameters2/5

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

With 0% schema description coverage and 2 parameters (query, collectionId), the description doesn't explain what these parameters mean. 'Find document ID by title' only hints at the 'query' parameter but doesn't clarify if it's the exact title, a search term, or case-sensitive. The 'collectionId' parameter isn't mentioned at all, leaving it completely undocumented.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Find document ID by title' clearly states the tool's purpose with a specific verb ('Find') and resource ('document ID'), but it's vague about scope and doesn't differentiate from siblings like 'search_documents' or 'get_document'. It doesn't specify if this is an exact match, partial match, or how it handles duplicates.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. With siblings like 'search_documents' and 'get_document' available, there's no indication of whether this tool is for exact title lookups, faster queries, or specific use cases. No prerequisites or exclusions are mentioned.

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/huiseo/outline-wiki-mcp'

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