Skip to main content

MCP Beyond Tools in Java: Resources, Prompts, Sampling and Elicitation

Most MCP servers stop at tools. This post builds an incident-desk server in Java with resources, a prompt, sampling and elicitation on Spring AI 2.0.2 and MCP SDK 2.1.0, then breaks it on purpose: a client without the capability, a slow client, a stateless server that silently drops every tool, and what the 2026-07-28 spec changes.

Binary Tree Traversals in Java: Inorder, Preorder, Postorder and Level Order (Recursive and Iterative)

Binary tree traversal in Java on one numbered nine-node tree: recursive and iterative inorder, preorder and postorder with stack dry-run tables, one-stack postorder, Morris traversal, level order and zigzag with a queue, height, an O(n) versus O(n squared) diameter comparison by counted visits, a real StackOverflowError on a one-million-node skewed tree, and exam questions with answers.