← Back to Dashboard
1. Sampling & Roots2. Async Tasks (2025)3. Elicitation & HITL4. Structured Content & Tool Annotations5. Completions & Metadata

Completions & Metadata

📚 Advanced Features8 min100 XP

Autocompletion & Human-Friendly Metadata

MCP provides two features that dramatically improve usability for both humans and LLMs: the completion/complete method for autocompletion suggestions, and the _meta field for attaching human-friendly metadata like titles and icons to tools, resources, and prompts.

Completion Suggestions

The completion/complete method allows clients to request autocompletion suggestions for prompt arguments and resource template parameters. When a user starts typing a value, the Host can query the server for valid completions — similar to IDE autocomplete.

// Client requests completions for a prompt argument:
const result = await client.complete({
  ref: { type: "ref/prompt", name: "generate_report" },
  argument: { name: "department", value: "Sal" }
});
// Server returns: { completion: { values: ["Sales", "Salary Admin"], hasMore: false, total: 2 } }

Servers can also provide completions for resource template parameters, helping users discover valid URIs without memorizing exact patterns.

The _meta Field

Every tool, resource, and prompt can include a _meta field with a title property — a human-friendly display name used by Host UIs instead of the machine-oriented identifier.

server.tool(
  "search_kb",          // Machine name (used in code)
  "Search knowledge base articles",
  { query: z.string() },
  handler,
  { _meta: { title: "Knowledge Base Search" } }  // Human-friendly UI title
);

Hosts like Claude Desktop and Cursor render the title in their UI, making tools more discoverable and user-friendly. The _meta field can also carry icons for tools and resources, providing visual affordances in the Host application's tool picker.

💡 Key Insight: Completions transform the user experience from "memorize exact values" to "discover valid options as you type." Combined with _meta titles and icons, these features make MCP servers feel like polished, professional integrations rather than raw developer tools.
🧪 Knowledge Check
Press 1-4 to select1 of 3
What does the completion/complete method provide?
Code compilation
Autocompletion suggestions for prompt arguments and resource template parameters
File compression
Model training status
Watch: 139x Rust Speedup
Completions & Metadata | Advanced Features — MCP Academy