Simple MCP Tools and Gemini-CLI - Diary Analysis Agent Implementation

Simple MCP Tools and Gemini-CLI

agents genai gemini

Summary

Today I'm checking how gemini-cli can help me to create a simple app to analyze relevant entries in my diary and to give me an overview of major themes mentioned in the entries. The app should be able to handle 2 use cases:

I will be creating an MCP server using fastmcp to host the tools that will read entries of my diary (made with Obsidian). The diary is a collection of markdown files.

Use case: look up the diary

Diagram for 'look up the diary' use case

The agent could select a suitable tool for each task in the prompt and complete the tasks. Worth mentioning that in the implementation of the search_diary_tool I used ripgrep utility to search for a pattern provided in the prompt (<smth> in the diagram above).

Use case: analyze x last months

Diagram for 'analyze x last months' use case

Thoughts

Source code: agent-0511