Skip to main content
Glama

Convert Data Types

convert_data_types

Converts a dataset column to int, float, string, category, or datetime; use it to fix mismatched data types before analysis or modeling. For int, fill or drop missing values first.

Instructions

Convert a column to a specified data type. Args: dataset_id (str): ID of the dataset. col_name (str): Column to convert. convert_type (str): One of int, float, string, category, datetime. "int" needs a column without missing values (fill or drop them first). Returns: dict: the column and its new dtype.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "dataset_id": "<dataset_id>",
      "col_name": "<col_name>",
      "convert_type": "<convert_type>"
    },
    "name": "convert_data_types"
  }
}

Input Schema

NameRequiredDescriptionDefault
col_nameYes
dataset_idYes
convert_typeYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It discloses the allowed type set, the missing-value precondition for int, and the return shape, which is meaningful context beyond the schema. It does not say whether the conversion mutates the stored dataset in place or produces a copy, whether it is reversible, or what happens on an incompatible conversion (e.g., non-numeric strings to int).

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 purpose is front-loaded in one sentence, followed by a compact argument list and a return note. The docstring-style Args block is slightly verbose in formatting but every line carries information; nothing is redundant.

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?

For a three-parameter mutation with no annotations and no output schema, the description covers types, one precondition, and the return value. The key remaining gap is mutation semantics: whether the dataset is modified persistently and whether an existing column's data can be lost, which an agent needs before calling it.

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

Parameters4/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, and it does: all three parameters are named with their roles, and convert_type is given the only enumeration available anywhere (int, float, string, category, datetime) since the schema declares it as a bare string. The int/missing-value constraint adds real semantic weight.

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: convert a column to a specified data type. That is unambiguous about what the tool does. It does not, however, differentiate itself from nearby siblings like column_types, encode_categorical, or extract_date_features, so an agent must infer the boundary.

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 rather than stated: the allowed target types signal when the tool applies, and the note that 'int' requires a column without missing values (fill or drop them first) is a genuinely useful precondition that points toward drop_missing. There is no explicit when-to-use/when-not-to-use guidance or comparison against encode_categorical or extract_date_features.

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

Deploy Server

Other Tools