Skip to main content
Glama
netologist

Bear Notes MCP Server

by netologist

find_kubernetes_examples

Search Bear notes for Kubernetes manifest examples by resource type to implement configurations in your projects.

Instructions

Find Kubernetes manifest examples in Bear notes

Args: resource_type: Kubernetes resource type to search for (deployment, service, configmap, etc.)

Returns: Notes containing Kubernetes examples

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
resource_typeNodeployment

Implementation Reference

  • main.py:205-245 (handler)
    The @mcp.tool() decorated function that implements and registers the 'find_kubernetes_examples' MCP tool. It searches Bear notes for Kubernetes-related terms based on the resource_type parameter, deduplicates results, extracts code blocks (checking for YAML), and returns up to 20 matching notes.
    @mcp.tool()
    def find_kubernetes_examples(resource_type: str = "deployment") -> List[Dict[str, Any]]:
        """
        Find Kubernetes manifest examples in Bear notes
        
        Args:
            resource_type: Kubernetes resource type to search for (deployment, service, configmap, etc.)
        
        Returns:
            Notes containing Kubernetes examples
        """
        try:
            # Search for Kubernetes-related terms
            k8s_terms = [
                f"kind: {resource_type.title()}",
                f"apiVersion:",
                f"kubernetes {resource_type}",
                f"k8s {resource_type}",
                f"kubectl",
                "yaml",
                "manifest"
            ]
            
            results = []
            seen_ids = set()
            
            for term in k8s_terms:
                notes = search_notes(term, limit=10)
                for note in notes:
                    if note["id"] not in seen_ids:
                        # Extract code blocks if present
                        code_blocks = extract_code_blocks(note["content"])
                        note["code_blocks"] = code_blocks
                        note["has_yaml"] = any("yaml" in block["language"].lower() for block in code_blocks)
                        results.append(note)
                        seen_ids.add(note["id"])
            
            return results[:20]  # Limit to 20 results
            
        except Exception as e:
            return [{"error": f"Error searching Kubernetes examples: {str(e)}"}]
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. It states it 'finds' examples (implies read-only) and returns notes, but lacks behavioral details: search scope (all notes/tagged notes?), match criteria (exact/partial?), return format (note titles/content?), or limitations (pagination/rate limits?).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Well-structured with purpose, args, and returns sections in 4 sentences. The purpose sentence is front-loaded, but the 'Args:' and 'Returns:' labels add minor verbosity without enhancing clarity for an AI agent.

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?

Incomplete for a search tool with no annotations or output schema. The description lacks details on search behavior (e.g., fuzzy matching), result format (e.g., note IDs vs content), and constraints (e.g., max results). Given 1 parameter with 0% schema coverage, it should explain parameter usage more thoroughly.

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

Parameters3/5

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

Schema description coverage is 0%, so the description must compensate. It adds meaning by explaining 'resource_type' as 'Kubernetes resource type to search for (deployment, service, configmap, etc.)', providing examples beyond the schema's generic 'Resource Type' title. However, it doesn't clarify if 'etc.' includes custom resources or if the search is case-sensitive.

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

Purpose4/5

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

The description clearly states the tool's purpose: 'Find Kubernetes manifest examples in Bear notes' (verb+resource+scope). It distinguishes from siblings like 'find_code_examples' by specifying Kubernetes manifests, but doesn't explicitly differentiate from 'search_bear_notes' which might also find notes with Kubernetes content.

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?

No guidance on when to use this tool vs alternatives. It doesn't mention when to prefer 'find_code_examples' (for general code) or 'search_bear_notes' (for broader searches), nor does it specify prerequisites like needing Bear notes with Kubernetes examples.

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/netologist/mcp-bear-notes'

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