Datasets:
Download interfaces/genomespy/documents/code-functions-index.md from flekschas/mcp-web-experiments: direct link, hf CLI and curl.
- Browser
- Download file 11.9 kB
-
https://huggingface.co/datasets/flekschas/mcp-web-experiments/resolve/main/interfaces/genomespy/documents/code-functions-index.md
- Command line
-
hf download hf://datasets/flekschas/mcp-web-experiments/interfaces/genomespy/documents/code-functions-index.md
-
curl -L -o code-functions-index.md https://huggingface.co/datasets/flekschas/mcp-web-experiments/resolve/main/interfaces/genomespy/documents/code-functions-index.md
GenomeSpy 0.88.1 submission contract
Build one complete GenomeSpy 0.88.1 specification for the task by composing constructors. The host renders it in a fixed 900 × 620 CSS-pixel viewport with hg38 assembly metadata supplied by the host.
Submit a complete JavaScript program with the code tool. Constructors are functions in scope; each validates its own input and returns a fragment. Every constructor is async: always await it. Build bottom-up: create leaf objects such as scales, axes, and data first, then compose them into larger objects such as encodings and views, and finish with the root constructor. The program returns the root object a constructor produced. The TypeScript signatures are reference only: write plain JavaScript, with no type annotations. Imports, files, and network access are disabled.
A root object that no constructor produced is refused. Fragments are not validated as complete specifications; the root is validated when it is submitted.
Constructor signatures start unloaded. The appendix names every constructor; look up the ones you need with get_signature({ names: [...] }), by exact name, at most 20 per call. A result holds only the signatures that call newly revealed: a name already looked up, repeated, past the limit, or not in the index returns nothing. A program can call a constructor once its lookup result has arrived; any other constructor name is undefined in the program, including one looked up in the same turn.
Bind the task rows by name with data: { name: "table" }, passed to the constructor that takes data. The host replaces each such reference with exactly the rows shown in the task before validation. Do not copy the rows into the specification: inline data is rejected. Views may filter or reuse the same rows.
The program may also read the same rows, for example to compute domains:
declare function getData(): Promise<Array<Record<string, unknown>>>;
The host accepts a submission only after JSON-Schema validation, native compilation, and a render without console, page, or network errors all succeed. A rejected constructor call or submission returns its error. Repair it by submitting another complete program.
Each attempt is retained for evaluation. The latest submission, not the last accepted one, controls the final outcome: a later invalid submission makes the final outcome invalid even when an earlier accepted chart is retained for audit. Stop after acceptance.
Constructor index:
All 326 constructors generated from the GenomeSpy 0.88.1 schema, by name:
create_aggregate_op, create_field, create_align, create_arrow_config, create_arrow_config_part2, create_arrow_config_part3, create_arrow_config_part4, create_expr_ref, create_arrow_size, create_tooltip, create_arrow_props, create_arrow_props_part2, create_arrow_props_part3, create_arrow_props_part4, create_axis, create_axis_part2, create_axis_part3, create_axis_part4, create_axis_part5, create_axis_part6, create_baseline, create_font_style, create_font_weight, create_axis_orient, create_axis_placement, create_axis_config, create_axis_config_part2, create_axis_config_part3, create_axis_config_part4, create_axis_config_part5, create_axis_config_part6, create_axis_config_part7, create_axis_config_part8, create_primary_positional_channel, create_axis_label_layout_params, create_axis_label_layout_params_part2, create_index_url_source_ref, create_single_url_source_ref, create_url_template, create_field_name, create_parse, create_multi_url_source_ref, create_binding, create_channel_with_scale, create_genome_axis, create_genome_axis_part2, create_genome_axis_part3, create_genome_axis_part4, create_genome_axis_part5, create_genome_axis_part6, create_genome_axis_part7, create_genome_axis_part8, create_scale, create_scale_part2, create_scale_part3, create_inline_locus_assembly, create_scalar_domain, create_complex_domain, create_chromosomal_locus, create_selection_domain_ref, create_viewport_domain_ref, create_domain_value_array, create_scale_interpolate, create_scale_interpolate_params, create_scheme_params, create_scale_type, create_zoom_params, create_compare_params, create_color_def, create_color_scheme_config, create_concat_spec_axes_x, create_concat_spec_axes_x_part2, create_concat_spec_axes_x_part3, create_concat_spec_axes_x_part4, create_concat_spec_axes_x_part5, create_concat_spec_axes_x_part6, create_concat_spec_axes_x_part7, create_concat_spec_axes_x_part8, create_concat_spec_axes_y, create_concat_spec_axes_y_part2, create_concat_spec_axes_y_part3, create_concat_spec_axes_y_part4, create_concat_spec_axes_y_part5, create_concat_spec_axes_y_part6, create_concat_spec_axes_y_part7, create_concat_spec_axes_y_part8, create_unit_spec, create_unit_spec_part2, create_unit_spec_part3, create_unit_spec_part4, create_unit_spec_part5, create_unit_spec_axes_x, create_unit_spec_axes_x_part2, create_unit_spec_axes_x_part3, create_unit_spec_axes_x_part4, create_unit_spec_axes_x_part5, create_unit_spec_axes_x_part6, create_unit_spec_axes_x_part7, create_unit_spec_axes_x_part8, create_unit_spec_axes_y, create_unit_spec_axes_y_part2, create_unit_spec_axes_y_part3, create_unit_spec_axes_y_part4, create_unit_spec_axes_y_part5, create_unit_spec_axes_y_part6, create_unit_spec_axes_y_part7, create_unit_spec_axes_y_part8, create_genome_spy_config, create_genome_spy_config_part2, create_genome_spy_config_part3, create_genome_spy_config_part4, create_genome_spy_config_part5, create_genome_spy_config_part6, create_legend_config, create_legend_config_part2, create_legend_config_part3, create_legend_config_part4, create_legend_config_part5, create_legend_direction, create_legend_layout, create_legend_region_anchor, create_legend_region_layout, create_legend_orient, create_legend_title_orient, create_link_config, create_link_config_part2, create_link_config_part3, create_point_config, create_point_config_part2, create_point_config_part3, create_point_config_part4, create_rect_config, create_rect_config_part2, create_rect_config_part3, create_rect_config_part4, create_rule_config, create_rule_config_part2, create_rule_config_part3, create_scale_config, create_scale_config_part2, create_scale_config_part3, create_scale_config_part4, create_scale_config_index, create_scale_config_index_part2, create_scale_config_index_part3, create_scale_config_locus, create_scale_config_locus_part2, create_scale_config_locus_part3, create_scale_config_nominal, create_scale_config_nominal_part2, create_scale_config_nominal_part3, create_scale_config_ordinal, create_scale_config_ordinal_part2, create_scale_config_ordinal_part3, create_scale_config_quantitative, create_scale_config_quantitative_part2, create_scale_config_quantitative_part3, create_text_config, create_text_config_part2, create_text_config_part3, create_text_config_part4, create_text_config_part5, create_scalar, create_title_config, create_title_config_part2, create_title_config_part3, create_title_anchor, create_title_frame, create_title_orient, create_step, create_data, create_data_source, create_url_data, create_data_format, create_inline_data, create_named_data, create_lazy_data, create_generator, create_encoding, create_encoding_part2, create_encoding_part3, create_encoding_part4, create_numeric_mark_prop_def, create_mark_prop_expr_def, create_legend, create_legend_part2, create_legend_part3, create_type, create_field_def_without_scale, create_text_def, create_position2def, create_position_value_def, create_offset_def, create_size_def, create_rect_props, create_rect_props_part2, create_rect_props_part3, create_rect_props_part4, create_text_props, create_text_props_part2, create_text_props_part3, create_text_props_part4, create_text_props_part5, create_rule_props, create_rule_props_part2, create_rule_props_part3, create_tick_props, create_tick_props_part2, create_tick_props_part3, create_link_props, create_link_props_part2, create_link_props_part3, create_point_props, create_point_props_part2, create_point_props_part3, create_point_props_part4, create_view_opacity_def, create_numeric_stop_def, create_overhang_config, create_padding_config, create_parameter, create_param_transition, create_dom_event_type, create_event_config, create_ruler_event_type, create_ruler_channel_value, create_title, create_title_part2, create_title_part3, create_transform_params, create_view_background, create_layer_spec, create_layer_spec_part2, create_layer_spec_part3, create_layer_spec_part4, create_layer_spec_part5, create_layer_spec_axes_x, create_layer_spec_axes_x_part2, create_layer_spec_axes_x_part3, create_layer_spec_axes_x_part4, create_layer_spec_axes_x_part5, create_layer_spec_axes_x_part6, create_layer_spec_axes_x_part7, create_layer_spec_axes_x_part8, create_layer_spec_axes_y, create_layer_spec_axes_y_part2, create_layer_spec_axes_y_part3, create_layer_spec_axes_y_part4, create_layer_spec_axes_y_part5, create_layer_spec_axes_y_part6, create_layer_spec_axes_y_part7, create_layer_spec_axes_y_part8, create_multiscale_spec, create_multiscale_spec_part2, create_multiscale_spec_part3, create_multiscale_spec_part4, create_multiscale_spec_part5, create_multiscale_spec_axes_x, create_multiscale_spec_axes_x_part2, create_multiscale_spec_axes_x_part3, create_multiscale_spec_axes_x_part4, create_multiscale_spec_axes_x_part5, create_multiscale_spec_axes_x_part6, create_multiscale_spec_axes_x_part7, create_multiscale_spec_axes_x_part8, create_multiscale_spec_axes_y, create_multiscale_spec_axes_y_part2, create_multiscale_spec_axes_y_part3, create_multiscale_spec_axes_y_part4, create_multiscale_spec_axes_y_part5, create_multiscale_spec_axes_y_part6, create_multiscale_spec_axes_y_part7, create_multiscale_spec_axes_y_part8, create_import_spec, create_v_concat_spec, create_v_concat_spec_part2, create_v_concat_spec_part3, create_v_concat_spec_part4, create_v_concat_spec_part5, create_v_concat_spec_axes_x, create_v_concat_spec_axes_x_part2, create_v_concat_spec_axes_x_part3, create_v_concat_spec_axes_x_part4, create_v_concat_spec_axes_x_part5, create_v_concat_spec_axes_x_part6, create_v_concat_spec_axes_x_part7, create_v_concat_spec_axes_x_part8, create_v_concat_spec_axes_y, create_v_concat_spec_axes_y_part2, create_v_concat_spec_axes_y_part3, create_v_concat_spec_axes_y_part4, create_v_concat_spec_axes_y_part5, create_v_concat_spec_axes_y_part6, create_v_concat_spec_axes_y_part7, create_v_concat_spec_axes_y_part8, create_separator_props, create_separator_props_part2, create_separator_props_part3, create_h_concat_spec, create_h_concat_spec_part2, create_h_concat_spec_part3, create_h_concat_spec_part4, create_h_concat_spec_part5, create_h_concat_spec_axes_x, create_h_concat_spec_axes_x_part2, create_h_concat_spec_axes_x_part3, create_h_concat_spec_axes_x_part4, create_h_concat_spec_axes_x_part5, create_h_concat_spec_axes_x_part6, create_h_concat_spec_axes_x_part7, create_h_concat_spec_axes_x_part8, create_h_concat_spec_axes_y, create_h_concat_spec_axes_y_part2, create_h_concat_spec_axes_y_part3, create_h_concat_spec_axes_y_part4, create_h_concat_spec_axes_y_part5, create_h_concat_spec_axes_y_part6, create_h_concat_spec_axes_y_part7, create_h_concat_spec_axes_y_part8, create_type_for_shape, create_parameter_predicate, create_selection_union_test, create_contig, create_legend_resolution_behavior, create_resolution_behavior, create_spec
Composition example, as a program; a JSON tool call takes the same argument object:
const scale = await create_scale({ domainMin: 0 });
const axis = await create_axis({ grid: true });
const encY = await create_encoding({ y: { field: "score", type: "quantitative", scale, axis } });
const encX = await create_encoding_part3({ x: { chrom: "chromosome", pos: "position", type: "locus" } });
const data = await create_data({ value: { name: "table" } });
return await create_spec({ value: { assembly: "hg38", data, mark: "point", encoding: { ...encX, ...encY } } });