shipfastlabs/toolkit-calculator 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

shipfastlabs/toolkit-calculator

Composer 安装命令:

composer require shipfastlabs/toolkit-calculator

包简介

Calculator tool for the Laravel AI SDK

README 文档

README

Latest Version Total Downloads

Calculator tool for the Laravel AI SDK

Part of the shipfastlabs/toolkit catalog of reusable AI tools for the Laravel AI SDK.

Installation

composer require shipfastlabs/toolkit-calculator

Usage

Instantiate the tool and pass it to an agent's tools():

use Shipfastlabs\Toolkit\Calculator\CalculatorTool;

$tools = [new CalculatorTool];

Input schema

Parameter Type Required Description
expression string yes The mathematical expression to evaluate, e.g. "3 * (4 + 1)".

Supports +, -, *, /, %, ^ (exponent, right-associative), parentheses, unary +/- and decimal numbers.

Configuration

None. The calculator is pure and ships no config or service provider.

Safety

The expression is parsed by a small recursive-descent evaluator; PHP's eval() is never used. Invalid input, division or modulo by zero, and non-finite results are returned to the model as plain strings rather than thrown, so the model can recover.

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-05-31

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固