Skip to main content
Glama

Update expense

update_expense
Idempotent

Change any field of an expense; splits are recomputed when amount, paid_by or split change. Changing the amount of an exact split requires a new split. Every change is kept in the history.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
notesNo
splitNo
amountNo
paid_byNo
currencyNo
expense_idYes
descriptionNo
occurred_atNo
receipt_urlNo
idempotency_keyYesAny unique string you make up for this action, 8-128 characters (a UUID works). Reuse the same key only to retry this exact call.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
inboxNo
expenseYes
suggested_nextYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / paid_by / anyOf
      Previous value: -[
      -  {
      -    "properties": {
      -      "agent_id": {
      -        "format": "uuid",
      -        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "agent_id"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "properties": {
      -      "handle": {
      -        "pattern": "^[a-z0-9][a-z0-9_-]{2,31}$",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "handle"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "properties": {
      +      "agent_id": {
      +        "format": "uuid",
      +        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "agent_id"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "handle": {
      +        "pattern": "^@?[A-Za-z0-9][A-Za-z0-9_-]{2,31}$",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "handle"
      +    ],
      +    "type": "object"
      +  }
      +]
    • changedInput schema / properties / split / oneOf
      Previous value: -[
      -  {
      -    "properties": {
      -      "method": {
      -        "const": "equal",
      -        "type": "string"
      -      },
      -      "participants": {
      -        "items": {
      -          "anyOf": [
      -            {
      -              "properties": {
      -                "agent_id": {
      -                  "format": "uuid",
      -                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      -                  "type": "string"
      -                }
      -              },
      -              "required": [
      -                "agent_id"
      -              ],
      -              "type": "object"
      -            },
      -            {
      -              "properties": {
      -                "handle": {
      -                  "pattern": "^[a-z0-9][a-z0-9_-]{2,31}$",
      -                  "type": "string"
      -                }
      -              },
      -              "required": [
      -                "handle"
      -              ],
      -              "type": "object"
      -            }
      -          ]
      -        },
      -        "maxItems": 50,
      -        "minItems": 1,
      -        "type": "array"
      -      }
      -    },
      -    "required": [
      -      "method"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "properties": {
      -      "method": {
      -        "const": "exact",
      -        "type": "string"
      -      },
      -      "shares": {
      -        "items": {
      -          "properties": {
      -            "agent": {
      -              "anyOf": [
      -                {
      -                  "properties": {
      -                    "agent_id": {
      -                      "format": "uuid",
      -                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      -                      "type": "string"
      -                    }
      -                  },
      -                  "required": [
      -                    "agent_id"
      -                  ],
      -                  "type": "object"
      -                },
      -                {
      -                  "properties": {
      -                    "handle": {
      -                      "pattern": "^[a-z0-9][a-z0-9_-]{2,31}$",
      -                      "type": "string"
      -                    }
      -                  },
      -                  "required": [
      -                    "handle"
      -                  ],
      -                  "type": "object"
      -                }
      -              ]
      -            },
      -            "amount": {
      -              "anyOf": [
      -                {
      -                  "maxLength": 32,
      -                  "minLength": 1,
      -                  "type": "string"
      -                },
      -                {
      -                  "exclusiveMinimum": 0,
      -                  "type": "number"
      -                }
      -              ]
      -            }
      -          },
      -          "required": [
      -            "agent",
      -            "amount"
      -          ],
      -          "type": "object"
      -        },
      -        "maxItems": 50,
      -        "minItems": 1,
      -        "type": "array"
      -      }
      -    },
      -    "required": [
      -      "method",
      -      "shares"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "properties": {
      -      "method": {
      -        "const": "shares",
      -        "type": "string"
      -      },
      -      "shares": {
      -        "items": {
      -          "properties": {
      -            "agent": {
      -              "anyOf": [
      -                {
      -                  "properties": {
      -                    "agent_id": {
      -                      "format": "uuid",
      -                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      -                      "type": "string"
      -                    }
      -                  },
      -                  "required": [
      -                    "agent_id"
      -                  ],
      -                  "type": "object"
      -                },
      -                {
      -                  "properties": {
      -                    "handle": {
      -                      "pattern": "^[a-z0-9][a-z0-9_-]{2,31}$",
      -                      "type": "string"
      -                    }
      -                  },
      -                  "required": [
      -                    "handle"
      -                  ],
      -                  "type": "object"
      -                }
      -              ]
      -            },
      -            "shares": {
      -              "maximum": 1000000,
      -              "minimum": 1,
      -              "type": "integer"
      -            }
      -          },
      -          "required": [
      -            "agent",
      -            "shares"
      -          ],
      -          "type": "object"
      -        },
      -        "maxItems": 50,
      -        "minItems": 1,
      -        "type": "array"
      -      }
      -    },
      -    "required": [
      -      "method",
      -      "shares"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "properties": {
      +      "method": {
      +        "const": "equal",
      +        "type": "string"
      +      },
      +      "participants": {
      +        "items": {
      +          "anyOf": [
      +            {
      +              "properties": {
      +                "agent_id": {
      +                  "format": "uuid",
      +                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      +                  "type": "string"
      +                }
      +              },
      +              "required": [
      +                "agent_id"
      +              ],
      +              "type": "object"
      +            },
      +            {
      +              "properties": {
      +                "handle": {
      +                  "pattern": "^@?[A-Za-z0-9][A-Za-z0-9_-]{2,31}$",
      +                  "type": "string"
      +                }
      +              },
      +              "required": [
      +                "handle"
      +              ],
      +              "type": "object"
      +            }
      +          ]
      +        },
      +        "maxItems": 50,
      +        "minItems": 1,
      +        "type": "array"
      +      }
      +    },
      +    "required": [
      +      "method"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "method": {
      +        "const": "exact",
      +        "type": "string"
      +      },
      +      "shares": {
      +        "items": {
      +          "properties": {
      +            "agent": {
      +              "anyOf": [
      +                {
      +                  "properties": {
      +                    "agent_id": {
      +                      "format": "uuid",
      +                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      +                      "type": "string"
      +                    }
      +                  },
      +                  "required": [
      +                    "agent_id"
      +                  ],
      +                  "type": "object"
      +                },
      +                {
      +                  "properties": {
      +                    "handle": {
      +                      "pattern": "^@?[A-Za-z0-9][A-Za-z0-9_-]{2,31}$",
      +                      "type": "string"
      +                    }
      +                  },
      +                  "required": [
      +                    "handle"
      +                  ],
      +                  "type": "object"
      +                }
      +              ]
      +            },
      +            "amount": {
      +              "anyOf": [
      +                {
      +                  "maxLength": 32,
      +                  "minLength": 1,
      +                  "type": "string"
      +                },
      +                {
      +                  "exclusiveMinimum": 0,
      +                  "type": "number"
      +                }
      +              ]
      +            }
      +          },
      +          "required": [
      +            "agent",
      +            "amount"
      +          ],
      +          "type": "object"
      +        },
      +        "maxItems": 50,
      +        "minItems": 1,
      +        "type": "array"
      +      }
      +    },
      +    "required": [
      +      "method",
      +      "shares"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "method": {
      +        "const": "shares",
      +        "type": "string"
      +      },
      +      "shares": {
      +        "items": {
      +          "properties": {
      +            "agent": {
      +              "anyOf": [
      +                {
      +                  "properties": {
      +                    "agent_id": {
      +                      "format": "uuid",
      +                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      +                      "type": "string"
      +                    }
      +                  },
      +                  "required": [
      +                    "agent_id"
      +                  ],
      +                  "type": "object"
      +                },
      +                {
      +                  "properties": {
      +                    "handle": {
      +                      "pattern": "^@?[A-Za-z0-9][A-Za-z0-9_-]{2,31}$",
      +                      "type": "string"
      +                    }
      +                  },
      +                  "required": [
      +                    "handle"
      +                  ],
      +                  "type": "object"
      +                }
      +              ]
      +            },
      +            "shares": {
      +              "maximum": 1000000,
      +              "minimum": 1,
      +              "type": "integer"
      +            }
      +          },
      +          "required": [
      +            "agent",
      +            "shares"
      +          ],
      +          "type": "object"
      +        },
      +        "maxItems": 50,
      +        "minItems": 1,
      +        "type": "array"
      +      }
      +    },
      +    "required": [
      +      "method",
      +      "shares"
      +    ],
      +    "type": "object"
      +  }
      +]
  2. First observed

TDQS

A3.6/5.0
Behavior4/5

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

With annotations already declaring non-destructive, idempotent behavior, the description adds real context the annotations cannot: side effects (splits recomputed when amount, paid_by or split change), a hard constraint (changing the amount of an exact split requires a new split), and audit behavior (every change kept in history). It does not discuss retry/idempotency behavior, which the idempotency_key param documents separately.

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?

Three short sentences, front-loaded with the core action, followed by two dense but useful caveats. No filler, though the split-related sentences could be consolidated slightly.

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

Completeness3/5

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

An output schema exists, so return values need no explanation, and the annotations cover the safety profile. But for a 10-parameter update tool with almost no per-parameter documentation, the description leaves the majority of fields unexplained, which is a real gap for correct invocation.

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 only 10%, so the description must compensate, and it partially does: it explains the interaction between amount, paid_by and split and a constraint on exact splits. However, the other parameters (currency, occurred_at, receipt_url, description, notes) get no semantic help, leaving a meaningful gap.

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 states a specific verb and resource ('Change any field of an expense') and immediately covers the tricky semantics of that operation. It clearly distinguishes a mutation from the read/list siblings, though it never names an alternative tool like get_expense or delete_expense explicitly.

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?

Usage is implied — you call it to modify an existing expense — but there is no explicit when-to-use guidance, no statement of prerequisites (e.g., the expense must exist, permissions required), and no comparison to sibling mutation tools. The split-changing rules are behavioral caveats rather than usage routing.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.