Skip to main content
Glama
ivossos

FCCS MCP Agentic Server

by ivossos

query_local_metadata

Retrieve dimension members from the local metadata cache using SQL-like filters to support Oracle EPM Cloud FCCS consolidation and reporting tasks.

Instructions

Query the local metadata cache for dimension members / Consultar cache local de metadados

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dimensionNoDimension name (e.g., Account, Entity)
member_filterNoSQL LIKE pattern for member name (e.g., 'FCCS_Net%')

Implementation Reference

  • The main handler function that executes the tool logic: queries local SQLite metadata cache for dimensions/members with optional filters.
    def query_local_metadata(
        dimension: Optional[str] = None,
        member_filter: Optional[str] = None,
        property_filter: Optional[str] = None
    ) -> dict[str, Any]:
        """Query the local metadata cache using SQLite.
        
        Args:
            dimension: Optional dimension name to filter by.
            member_filter: SQL LIKE pattern for member name (e.g., 'FCCS_%').
            property_filter: Optional JSON property filter (not implemented in this simplified version).
            
        Returns:
            dict: List of matching members and their properties.
        """
        cache = get_cache_service()
        if not cache:
            return {"status": "error", "error": "Cache service not initialized"}
            
        try:
            results = []
            with cache.Session() as session:
                from fccs_agent.services.cache_service import MetadataCache
                query = session.query(MetadataCache)
                
                if dimension:
                    query = query.filter(MetadataCache.dimension == dimension)
                if member_filter:
                    query = query.filter(MetadataCache.member.like(member_filter))
                    
                items = query.limit(100).all()
                for item in items:
                    results.append({
                        "dimension": item.dimension,
                        "member": item.member,
                        "properties": json.loads(item.properties)
                    })
                    
            return {
                "status": "success",
                "count": len(results),
                "data": results,
                "source": "local_sqlite"
            }
        except Exception as e:
            return {"status": "error", "error": str(e)}
  • Tool definition including name, description, and input schema for validation.
    TOOL_DEFINITIONS = [
        {
            "name": "query_local_metadata",
            "description": "Query the local metadata cache for dimension members / Consultar cache local de metadados",
            "inputSchema": {
                "type": "object",
                "properties": {
                    "dimension": {
                        "type": "string",
                        "description": "Dimension name (e.g., Account, Entity)",
                    },
                    "member_filter": {
                        "type": "string",
                        "description": "SQL LIKE pattern for member name (e.g., 'FCCS_Net%')",
                    },
                },
            },
        },
    ]
  • Registers the tool name to its handler function in the central TOOL_HANDLERS dictionary used by execute_tool.
        # Local Data
        "query_local_metadata": local_data.query_local_metadata,
    }
  • Includes the tool definitions (schemas) from local_data in the aggregated ALL_TOOL_DEFINITIONS for the MCP server.
    local_data.TOOL_DEFINITIONS
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It mentions querying a 'local metadata cache', implying read-only and possibly cached data, but doesn't disclose behavioral traits like performance, data freshness, error handling, or whether it requires specific permissions. This leaves significant gaps for a tool with no annotation coverage.

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?

The description is concise and front-loaded, stating the core purpose in a single phrase. However, the bilingual repetition ('Consultar cache local de metadados') adds minor redundancy without adding value, slightly reducing efficiency.

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 no annotations, no output schema, and a tool that queries metadata (which can be complex), the description is incomplete. It lacks details on return values, error conditions, or how it integrates with the system, making it inadequate for informed use by an AI agent.

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 100%, so the schema already documents both parameters ('dimension' and 'member_filter') with examples. The description adds no additional meaning beyond what the schema provides, such as explaining the cache's scope or how results are structured, resulting in a baseline score.

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 states the tool queries a local metadata cache for dimension members, which is a clear purpose. However, it doesn't specify what 'dimension members' are or how this differs from sibling tools like 'get_dimensions' or 'get_members', leaving the distinction vague.

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 is provided on when to use this tool versus alternatives. It doesn't mention prerequisites, context, or exclusions, such as when to prefer this over 'get_members' or other metadata-related tools in the sibling list.

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/ivossos/fccs-mcp-ag-server'

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