Skip to main content
Glama
svharivinod

TallyPrime MCP Server

by svharivinod

get_outstanding_receivables

Retrieve outstanding receivables from TallyPrime to see money owed by customers, with optional filters for date and specific party.

Instructions

Get outstanding receivables (money owed to you) from TallyPrime.

Args: as_of_date: Date YYYYMMDD. Defaults to today if not provided. party_name: Filter by a specific customer name (optional).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
as_of_dateNo
party_nameNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • MCP tool handler: async function decorated with @mcp.tool() that accepts as_of_date and party_name, calls client.get_outstanding_receivables(), and returns JSON-formatted string.
    @mcp.tool()
    async def get_outstanding_receivables(as_of_date: str = "", party_name: str = "") -> str:
        """
        Get outstanding receivables (money owed to you) from TallyPrime.
    
        Args:
            as_of_date: Date YYYYMMDD. Defaults to today if not provided.
            party_name: Filter by a specific customer name (optional).
        """
        try:
            if not as_of_date:
                as_of_date = _today()
            data = await client.get_outstanding_receivables(as_of_date, party_name)
            party_note = f" for '{party_name}'" if party_name else ""
            return f"Outstanding Receivables as of {as_of_date}{party_note}:\n\n" + json.dumps(data, indent=2)
        except TallyError as e:
            return f"Error: {e}"
  • Docstring serving as input schema: as_of_date (YYYYMMDD, optional, defaults to today) and party_name (customer filter, optional).
    """
    Get outstanding receivables (money owed to you) from TallyPrime.
    
    Args:
        as_of_date: Date YYYYMMDD. Defaults to today if not provided.
        party_name: Filter by a specific customer name (optional).
  • Registration entry point: register_all() calls reports.register(mcp, client) which applies the @mcp.tool() decorator inside reports.py.
    def register_all(mcp: FastMCP, client: TallyClient):
        company.register(mcp, client)
        ledgers.register(mcp, client)
        vouchers.register(mcp, client)
        reports.register(mcp, client)
  • The register() function wraps tool definitions with @mcp.tool() decorator, binding them to the FastMCP instance.
    def register(mcp, client: TallyClient):
  • TallyClient method: builds XML via xml_builder, sends it to TallyPrime, parses response, and converts to dict.
    async def get_outstanding_receivables(self, as_of_date: str, party_name: str = "") -> dict:
        from .xml_builder import get_outstanding_receivables_xml
        return self._elem_to_dict(self._parse(await self.send_xml(get_outstanding_receivables_xml(as_of_date, party_name))))
  • XML builder: generates the TallyPrime XML envelope with REPORTNAME 'Bills Receivable', optional PARTYLEDGERNAME filter, and SVTODATE.
    def get_outstanding_receivables_xml(as_of_date: str, party_name: str = "") -> str:
        party_tag = f"<PARTYLEDGERNAME>{party_name}</PARTYLEDGERNAME>" if party_name else ""
        return f"""<ENVELOPE>
      <HEADER>
        <TALLYREQUEST>Export Data</TALLYREQUEST>
      </HEADER>
      <BODY>
        <EXPORTDATA>
          <REQUESTDESC>
            <REPORTNAME>Bills Receivable</REPORTNAME>
            <STATICVARIABLES>
              <SVEXPORTFORMAT>$$SysName:XML</SVEXPORTFORMAT>
              <SVTODATE>{as_of_date}</SVTODATE>
              {party_tag}
            </STATICVARIABLES>
          </REQUESTDESC>
        </EXPORTDATA>
      </BODY>
    </ENVELOPE>"""
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 describes parameter behavior (default date, optional filter) but does not disclose whether the tool is read-only, has side effects, or requires specific permissions. More detail is needed for a complete behavioral picture.

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

Conciseness5/5

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

The description is extremely concise: one sentence for purpose, then a clear args list. Every sentence is necessary and efficient, with no wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (2 optional parameters) and the presence of an output schema (so return values are already documented), the description covers all essential aspects: purpose and parameter semantics. It is complete for an agent to select and invoke the tool correctly.

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

Parameters5/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 explains both parameters: 'as_of_date' with format 'YYYYMMDD' and default behavior, and 'party_name' as an optional filter. This adds significant meaning beyond the schema, which only has empty defaults and string types.

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

Purpose5/5

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

The description clearly states 'Get outstanding receivables (money owed to you) from TallyPrime', using a specific verb and resource. This distinguishes it from sibling tools like creation vouchers or other reports.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies use for retrieving receivables but provides no explicit guidance on when to use this tool versus alternatives or when not to use it. Given sibling tools are mostly creation-oriented, the context is clear but lacks exclusions.

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/svharivinod/tallyprime-mcp'

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